Procházet zdrojové kódy

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

无限递归产生StackoverflowException
master
Daniel Qian před 9 roky
rodič
revize
a25d2edc2f
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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 Zobrazit soubor

@@ -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);
}


Načítá se…
Zrušit
Uložit