Skip to content

Commit ccef34d

Browse files
authored
Merge pull request #194 from jpush/feature/20211231_TS-7021
jdk支持版本修改为1.6以上
2 parents 6143432 + 099f7fe commit ccef34d

File tree

17 files changed

+36
-37
lines changed

17 files changed

+36
-37
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>cn.jpush.api</groupId>
55
<artifactId>jpush-client</artifactId>
6-
<version>3.5.5</version>
6+
<version>3.6.0</version>
77
<packaging>jar</packaging>
88
<url>https://github.com/jpush/jpush-api-java-client</url>
99
<name>JPush API Java Client</name>
@@ -20,8 +20,8 @@
2020
<properties>
2121
<github.global.server>github</github.global.server>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23-
<jdkVersion>1.7</jdkVersion>
24-
<jdkVersion.test>1.7</jdkVersion.test>
23+
<jdkVersion>1.6</jdkVersion>
24+
<jdkVersion.test>1.6</jdkVersion.test>
2525
<!--<additionalparam>-Xdoclint:none</additionalparam>-->
2626
</properties>
2727

@@ -51,7 +51,7 @@
5151
<dependency>
5252
<groupId>cn.jpush.api</groupId>
5353
<artifactId>jiguang-common</artifactId>
54-
<version>1.1.12</version>
54+
<version>1.2.0</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>org.apache.httpcomponents</groupId>

src/main/java/cn/jpush/api/admin/AdminClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ public void uploadCertificate(String appKey, String devCertificateFile, String d
115115
NativeHttpClient client = (NativeHttpClient) mHttpClient;
116116
String url = mBasePath + mV1AppPath + "/" + appKey + "/certificate";
117117

118-
Map<String, String> fileMap = new HashMap<>();
119-
Map<String, String> textMap = new HashMap<>();
118+
Map<String, String> fileMap = new HashMap<String, String>();
119+
Map<String, String> textMap = new HashMap<String, String>();
120120

121121
if(devCertificateFile != null) {
122122
textMap.put("devCertificatePassword", devCertificatePassword);

src/main/java/cn/jpush/api/file/FileClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public FileUploadResult uploadFile(FileType type, String filename)
5353
NativeHttpClient client = (NativeHttpClient) _httpClient;
5454
String typeStr = type.value();
5555
String url = _baseUrl + _filesPath + "/" + typeStr;
56-
Map<String, String> fileMap = new HashMap<>();
56+
Map<String, String> fileMap = new HashMap<String,String>();
5757
fileMap.put("filename", filename);
5858
String response = client.formUploadByPost(url, null, fileMap, null);
5959
LOG.info("uploadFile:{}", response);

src/main/java/cn/jpush/api/image/ImageClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public ImageUploadResult uploadImage(ImageFilePayload imageFilePayload) {
8686
NativeHttpClient client = (NativeHttpClient) _httpClient;
8787
String url = _baseUrl + _imagesPath + "/" + ImageSource.FILE.value();
8888

89-
Map<String, String> textMap = new HashMap<>();
89+
Map<String, String> textMap = new HashMap<String, String>();
9090
textMap.put("image_type", String.valueOf(imageFilePayload.getImageType().value()));
9191

9292
Map<String, String> fileMap = imageFilePayload.toFileMap();

src/main/java/cn/jpush/api/image/model/ImageFilePayload.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class ImageFilePayload {
2222
private String jiguangFileName;
2323

2424
public Map<String, String> toFileMap() {
25-
HashMap<String, String> fileMap = new HashMap<>();
25+
HashMap<String, String> fileMap = new HashMap<String, String>();
2626
if (null != oppoFileName) {
2727
fileMap.put(OPPO_IMAGE_FILE, oppoFileName);
2828
}

src/main/java/cn/jpush/api/push/model/Message.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public Builder addExtra(String key, JsonObject value) {
188188

189189
public Builder addCustom(Map<String, String> extras) {
190190
if (customData == null) {
191-
customData = new LinkedHashMap<>();
191+
customData = new LinkedHashMap<String, JsonPrimitive>();
192192
}
193193
for (Map.Entry<String, String> entry : extras.entrySet()) {
194194
customData.put(entry.getKey(), new JsonPrimitive(entry.getValue()));
@@ -199,7 +199,7 @@ public Builder addCustom(Map<String, String> extras) {
199199
public Builder addCustom(String key, Number value) {
200200
Preconditions.checkArgument(!(null == key), "Key should not be null.");
201201
if (customData == null) {
202-
customData = new LinkedHashMap<>();
202+
customData = new LinkedHashMap<String, JsonPrimitive>();
203203
}
204204
customData.put(key, new JsonPrimitive(value));
205205
return this;
@@ -208,7 +208,7 @@ public Builder addCustom(String key, Number value) {
208208
public Builder addCustom(String key, String value) {
209209
Preconditions.checkArgument(!(null == key), "Key should not be null.");
210210
if (customData == null) {
211-
customData = new LinkedHashMap<>();
211+
customData = new LinkedHashMap<String, JsonPrimitive>();
212212
}
213213
customData.put(key, new JsonPrimitive(value));
214214
return this;
@@ -217,7 +217,7 @@ public Builder addCustom(String key, String value) {
217217
public Builder addCustom(String key, Boolean value) {
218218
Preconditions.checkArgument(!(null == key), "Key should not be null.");
219219
if (customData == null) {
220-
customData = new LinkedHashMap<>();
220+
customData = new LinkedHashMap<String, JsonPrimitive>();
221221
}
222222
customData.put(key, new JsonPrimitive(value));
223223
return this;

src/main/java/cn/jpush/api/push/model/Options.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ public Builder setBigPushDuration(int bigPushDuration) {
194194
@Deprecated
195195
public Map<String, Map<String, String>> getThirdPartyChannel() {
196196
if (null != thirdPartyChannel) {
197-
Map<String, Map<String, String>> thirdPartyChannelRsp = new HashMap<>();
197+
Map<String, Map<String, String>> thirdPartyChannelRsp = new HashMap<String, Map<String, String>>();
198198
Set<Map.Entry<String, JsonObject>> entrySet = thirdPartyChannel.entrySet();
199199
for (Map.Entry<String, JsonObject> entry : entrySet) {
200200
JsonObject entryValue = entry.getValue();
201201
Set<Map.Entry<String, JsonElement>> valueEntrySet = entryValue.entrySet();
202-
Map<String, String> valueMap = new HashMap<>();
202+
Map<String, String> valueMap = new HashMap<String, String>();
203203
for (Map.Entry<String, JsonElement> valueEntry : valueEntrySet) {
204204
valueMap.put(valueEntry.getKey(), null == valueEntry.getValue() ? null : valueEntry.getValue().getAsString());
205205
}
@@ -212,7 +212,7 @@ public Map<String, Map<String, String>> getThirdPartyChannel() {
212212

213213
@Deprecated
214214
public Builder setThirdPartyChannel(Map<String, Map<String, String>> thirdPartyChannel) {
215-
this.thirdPartyChannel = new HashMap<>();
215+
this.thirdPartyChannel = new HashMap<String, JsonObject>();
216216
if (null != thirdPartyChannel) {
217217
Set<Map.Entry<String, Map<String, String>>> entrySet = thirdPartyChannel.entrySet();
218218
for (Map.Entry<String, Map<String, String>> entry : entrySet) {
@@ -239,7 +239,7 @@ public Builder setThirdPartyChannelV2(Map<String, JsonObject> thirdPartyChannel)
239239

240240
public Builder addCustom(Map<String, String> extras) {
241241
if (customData == null) {
242-
customData = new LinkedHashMap<>();
242+
customData = new LinkedHashMap<String, JsonPrimitive>();
243243
}
244244
for (Map.Entry<String, String> entry : extras.entrySet()) {
245245
customData.put(entry.getKey(), new JsonPrimitive(entry.getValue()));
@@ -250,7 +250,7 @@ public Builder addCustom(Map<String, String> extras) {
250250
public Builder addCustom(String key, Number value) {
251251
Preconditions.checkArgument(! (null == key), "Key should not be null.");
252252
if (customData == null) {
253-
customData = new LinkedHashMap<>();
253+
customData = new LinkedHashMap<String, JsonPrimitive>();
254254
}
255255
customData.put(key, new JsonPrimitive(value));
256256
return this;
@@ -259,7 +259,7 @@ public Builder addCustom(String key, Number value) {
259259
public Builder addCustom(String key, String value) {
260260
Preconditions.checkArgument(! (null == key), "Key should not be null.");
261261
if (customData == null) {
262-
customData = new LinkedHashMap<>();
262+
customData = new LinkedHashMap<String, JsonPrimitive>();
263263
}
264264
customData.put(key, new JsonPrimitive(value));
265265
return this;
@@ -268,7 +268,7 @@ public Builder addCustom(String key, String value) {
268268
public Builder addCustom(String key, Boolean value) {
269269
Preconditions.checkArgument(! (null == key), "Key should not be null.");
270270
if (customData == null) {
271-
customData = new LinkedHashMap<>();
271+
customData = new LinkedHashMap<String, JsonPrimitive>();
272272
}
273273
customData.put(key, new JsonPrimitive(value));
274274
return this;

src/main/java/cn/jpush/api/push/model/PushPayload.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public static class Builder {
284284
private Map<String, JsonObject> custom;
285285

286286
public Builder() {
287-
this.custom = new LinkedHashMap<>();
287+
this.custom = new LinkedHashMap<String, JsonObject>();
288288
}
289289

290290
public Builder setTarget(String target) {

src/main/java/cn/jpush/api/push/model/audience/Audience.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public static Audience fromJsonElement(JsonElement jsonElement) {
145145
}
146146
boolean file = false;
147147
JsonObject jsonObject = jsonElement.getAsJsonObject();
148-
Set<AudienceTarget> audienceTargetSet = new HashSet<>();
148+
Set<AudienceTarget> audienceTargetSet = new HashSet<AudienceTarget>();
149149
for (AudienceType type : AudienceType.values()) {
150150
JsonArray jsonArray = jsonObject.getAsJsonArray(type.value());
151151
if (jsonArray == null) {

src/main/java/cn/jpush/api/push/model/audience/AudienceTarget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public JsonElement toFileJSON() {
114114
}
115115

116116
public static AudienceTarget fromJsonElement(JsonArray jsonArray, AudienceType type) {
117-
Set<String> stringSet = new HashSet<>();
117+
Set<String> stringSet = new HashSet<String>();
118118
if (jsonArray != null) {
119119
for (int i=0; i<jsonArray.size(); i++) {
120120
stringSet.add(jsonArray.get(i).getAsString());

0 commit comments

Comments
 (0)