Skip to content

Commit 920a2f7

Browse files
axeonbinarywang
authored andcommitted
#384 去掉executeInternal上会导致性能问题的同步代码synchronized
1 parent 6d566ce commit 920a2f7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceAbstractImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public <T, E> T execute(RequestExecutor<T, E> executor, String uri, E data) thro
381381
throw new RuntimeException("微信服务端异常,超出重试次数");
382382
}
383383

384-
protected synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
384+
protected <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
385385
if (uri.contains("access_token=")) {
386386
throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri);
387387
}

weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public <T, E> T execute(RequestExecutor<T, E> executor, String uri, E data) thro
181181
throw new RuntimeException("微信服务端异常,超出重试次数");
182182
}
183183

184-
public synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
184+
public <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
185185
if (uri.contains("access_token=")) {
186186
throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri);
187187
}

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceAbstractImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public <T, E> T execute(RequestExecutor<T, E> executor, String uri, E data) thro
259259
throw new RuntimeException("微信服务端异常,超出重试次数");
260260
}
261261

262-
public synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
262+
public <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
263263
if (uri.contains("access_token=")) {
264264
throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri);
265265
}

0 commit comments

Comments
 (0)