issue #204, 因为getAccessToken()方法可能返回过期数据,导致在executeInternal内部容易出现

无限递归产生StackoverflowException
This commit is contained in:
Daniel Qian
2015-09-14 12:38:29 +08:00
parent c722496167
commit a25d2edc2f

View File

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