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 {
3333 @ Override
3434 public String getCardApiTicket (boolean forceRefresh ) throws WxErrorException {
3535 Lock lock = this .wxMaService .getWxMaConfig ().getCardApiTicketLock ();
36+ lock .lock ();
3637 try {
37- lock .lock ();
3838 if (forceRefresh ) {
3939 this .wxMaService .getWxMaConfig ().expireCardApiTicket ();
4040 }
@@ -60,8 +60,8 @@ public String getJsapiTicket() throws WxErrorException {
6060 @ Override
6161 public String getJsapiTicket (boolean forceRefresh ) throws WxErrorException {
6262 Lock lock = this .wxMaService .getWxMaConfig ().getJsapiTicketLock ();
63+ lock .lock ();
6364 try {
64- lock .lock ();
6565 if (forceRefresh ) {
6666 this .wxMaService .getWxMaConfig ().expireJsapiTicket ();
6767 }
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ public String getTicket(TicketType type) throws WxErrorException {
101101 @ Override
102102 public String getTicket (TicketType type , boolean forceRefresh ) throws WxErrorException {
103103 Lock lock = this .getWxMpConfigStorage ().getTicketLock (type );
104+ lock .lock ();
104105 try {
105- lock .lock ();
106106 if (forceRefresh ) {
107107 this .getWxMpConfigStorage ().expireTicket (type );
108108 }
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ public String getCardApiTicket() throws WxErrorException {
4949 public String getCardApiTicket (boolean forceRefresh ) throws WxErrorException {
5050 final TicketType type = TicketType .WX_CARD ;
5151 Lock lock = getWxMpService ().getWxMpConfigStorage ().getTicketLock (type );
52+ lock .lock ();
5253 try {
53- lock .lock ();
5454
5555 if (forceRefresh ) {
5656 this .getWxMpService ().getWxMpConfigStorage ().expireTicket (type );
You can’t perform that action at this time.
0 commit comments