Skip to content

Commit a25d2ed

Browse files
committed
issue #204, 因为getAccessToken()方法可能返回过期数据,导致在executeInternal内部容易出现
无限递归产生StackoverflowException
1 parent c722496 commit a25d2ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpServiceImpl.java

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

558-
protected <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
558+
protected synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException {
559559
if (uri.indexOf("access_token=") != -1) {
560560
throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri);
561561
}

0 commit comments

Comments
 (0)