Skip to content

Commit 5aa51e2

Browse files
committed
fix some warnings
1 parent f13dcaa commit 5aa51e2

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/WxMpBusyRetryTest.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
package me.chanjar.weixin.mp.api;
22

3-
import me.chanjar.weixin.common.bean.result.WxError;
4-
import me.chanjar.weixin.common.exception.WxErrorException;
5-
import me.chanjar.weixin.common.util.http.RequestExecutor;
6-
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
7-
import org.testng.annotations.DataProvider;
8-
import org.testng.annotations.Test;
9-
103
import java.util.concurrent.ExecutionException;
114
import java.util.concurrent.ExecutorService;
125
import java.util.concurrent.Executors;
136
import java.util.concurrent.Future;
147

8+
import org.testng.annotations.DataProvider;
9+
import org.testng.annotations.Test;
10+
11+
import me.chanjar.weixin.common.bean.result.WxError;
12+
import me.chanjar.weixin.common.exception.WxErrorException;
13+
import me.chanjar.weixin.common.util.http.RequestExecutor;
14+
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
15+
1516
@Test
1617
public class WxMpBusyRetryTest {
1718

@@ -20,7 +21,9 @@ public Object[][] getService() {
2021
WxMpService service = new WxMpServiceImpl() {
2122

2223
@Override
23-
protected <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
24+
protected synchronized <T, E> T executeInternal(
25+
RequestExecutor<T, E> executor, String uri, E data)
26+
throws WxErrorException {
2427
WxError error = new WxError();
2528
error.setErrorCode(-1);
2629
throw new WxErrorException(error);

weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/WxMpJsAPITest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package me.chanjar.weixin.mp.api;
22

3-
import com.google.inject.Inject;
4-
import me.chanjar.weixin.common.exception.WxErrorException;
5-
import me.chanjar.weixin.common.util.crypto.SHA1;
6-
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
73
import org.testng.Assert;
84
import org.testng.annotations.Guice;
95
import org.testng.annotations.Test;
106

11-
import java.security.NoSuchAlgorithmException;
7+
import com.google.inject.Inject;
8+
9+
import me.chanjar.weixin.common.exception.WxErrorException;
10+
import me.chanjar.weixin.common.util.crypto.SHA1;
11+
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
1212

1313
/**
1414
* 测试jsapi ticket接口
@@ -29,7 +29,7 @@ public void testJsapiTicket() throws WxErrorException {
2929
Assert.assertNotNull(jsapiTicket);
3030
}
3131

32-
public void test() throws NoSuchAlgorithmException {
32+
public void test() {
3333
long timestamp = 1419835025l;
3434
String url = "http://omstest.vmall.com:23568/thirdparty/wechat/vcode/gotoshare?quantity=1&batchName=MATE7";
3535
String noncestr = "82693e11-b9bc-448e-892f-f5289f46cd0f";

0 commit comments

Comments
 (0)