Skip to content

Commit c23b540

Browse files
Copilotbinarywang
andcommitted
修复测试代码中的var类型声明以提高兼容性
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
1 parent 9d81192 commit c23b540

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpServiceGetMsgAuditAccessTokenTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import org.testng.annotations.BeforeMethod;
88
import org.testng.annotations.Test;
99

10+
import java.util.concurrent.locks.Lock;
11+
1012
import static org.assertj.core.api.Assertions.assertThat;
1113
import static org.assertj.core.api.Assertions.assertThatThrownBy;
1214

@@ -183,7 +185,7 @@ public String getAccessToken(boolean forceRefresh) throws WxErrorException {
183185
@Override
184186
public String getMsgAuditAccessToken(boolean forceRefresh) throws WxErrorException {
185187
// 使用锁机制
186-
var lock = getWxCpConfigStorage().getMsgAuditAccessTokenLock();
188+
Lock lock = getWxCpConfigStorage().getMsgAuditAccessTokenLock();
187189
lock.lock();
188190
try {
189191
// 检查是否需要刷新

0 commit comments

Comments
 (0)