Skip to content

Commit a56db79

Browse files
author
x1a0d@n9
committed
builder v1
1 parent 4f136e5 commit a56db79

3 files changed

Lines changed: 5 additions & 12 deletions

File tree

src/cn/jpush/api/ErrorCodeEnum.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ public enum ErrorCodeEnum {
3232
InvalidAppKey(1009),
3333

3434
//msg_content不合法
35-
InvalidMsgContentValue(1010);
35+
InvalidMsgContentValue(1010),
36+
37+
//没有满足条件的推送目标
38+
InvalidPush(1011);
3639

3740
private final int value;
3841
private ErrorCodeEnum(final int value) {

src/cn/jpush/api/JPushClient.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
import org.apache.http.util.EntityUtils;
1515

1616
public class JPushClient {
17-
private final boolean DEBUG_MODE = true;
18-
1917
private final String hostname = "api.jpush.cn:8800";
2018
private static final String CHARSET = "UTF-8";
2119

@@ -222,14 +220,6 @@ protected MessageResult post(final String path, final MessageParams obj) {
222220
if (null != obj) {
223221
post.setEntity(toEntity(obj));
224222
}
225-
if (DEBUG_MODE) {
226-
try {
227-
System.out.println("==请求的参数==");
228-
System.out.println(EntityUtils.toString(post.getEntity()).replace("&", "\n"));
229-
} catch (Exception ex) {
230-
ex.printStackTrace();
231-
}
232-
}
233223
HttpResponse response = execute(post);
234224
HttpEntity responseEntity = response.getEntity();
235225
try {

src/cn/jpush/test/JpushClientTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class JpushClientTest {
1414

1515
private final String username = "username";
1616
private final String password = "password";
17-
private final String callbackUrl = "callbackUrl";
17+
private final String callbackUrl = "url";
1818
private JPushClient client = null;
1919

2020
@BeforeTest

0 commit comments

Comments
 (0)