File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ public String getCardApiTicket() throws WxErrorException {
33
33
@ Override
34
34
public String getCardApiTicket (boolean forceRefresh ) throws WxErrorException {
35
35
Lock lock = this .wxMaService .getWxMaConfig ().getCardApiTicketLock ();
36
+ lock .lock ();
36
37
try {
37
- lock .lock ();
38
38
if (forceRefresh ) {
39
39
this .wxMaService .getWxMaConfig ().expireCardApiTicket ();
40
40
}
@@ -60,8 +60,8 @@ public String getJsapiTicket() throws WxErrorException {
60
60
@ Override
61
61
public String getJsapiTicket (boolean forceRefresh ) throws WxErrorException {
62
62
Lock lock = this .wxMaService .getWxMaConfig ().getJsapiTicketLock ();
63
+ lock .lock ();
63
64
try {
64
- lock .lock ();
65
65
if (forceRefresh ) {
66
66
this .wxMaService .getWxMaConfig ().expireJsapiTicket ();
67
67
}
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ public String getTicket(TicketType type) throws WxErrorException {
101
101
@ Override
102
102
public String getTicket (TicketType type , boolean forceRefresh ) throws WxErrorException {
103
103
Lock lock = this .getWxMpConfigStorage ().getTicketLock (type );
104
+ lock .lock ();
104
105
try {
105
- lock .lock ();
106
106
if (forceRefresh ) {
107
107
this .getWxMpConfigStorage ().expireTicket (type );
108
108
}
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ public String getCardApiTicket() throws WxErrorException {
49
49
public String getCardApiTicket (boolean forceRefresh ) throws WxErrorException {
50
50
final TicketType type = TicketType .WX_CARD ;
51
51
Lock lock = getWxMpService ().getWxMpConfigStorage ().getTicketLock (type );
52
+ lock .lock ();
52
53
try {
53
- lock .lock ();
54
54
55
55
if (forceRefresh ) {
56
56
this .getWxMpService ().getWxMpConfigStorage ().expireTicket (type );
You can’t perform that action at this time.
0 commit comments