#384 去掉executeInternal上会导致性能问题的同步代码synchronized

This commit is contained in:
axeon 2017-11-24 12:25:20 +08:00 committed by Binary Wang
parent 6d566ced44
commit 920a2f7e13
3 changed files with 3 additions and 3 deletions

View File

@ -381,7 +381,7 @@ public abstract class WxCpServiceAbstractImpl<H, P> implements WxCpService, Requ
throw new RuntimeException("微信服务端异常,超出重试次数");
}
protected synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
protected <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
if (uri.contains("access_token=")) {
throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri);
}

View File

@ -181,7 +181,7 @@ public class WxMaServiceImpl implements WxMaService, RequestHttp<CloseableHttpCl
throw new RuntimeException("微信服务端异常,超出重试次数");
}
public synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
public <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
if (uri.contains("access_token=")) {
throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri);
}

View File

@ -259,7 +259,7 @@ public abstract class WxMpServiceAbstractImpl<H, P> implements WxMpService, Requ
throw new RuntimeException("微信服务端异常,超出重试次数");
}
public synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
public <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
if (uri.contains("access_token=")) {
throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri);
}