Browse Source

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

无限递归产生StackoverflowException
master
Daniel Qian 9 years ago
parent
commit
a25d2edc2f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpServiceImpl.java

+ 1
- 1
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpServiceImpl.java 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);
}


Loading…
Cancel
Save