From 45a87c5debc1ae8982ec4e39ab00a8471febd97f Mon Sep 17 00:00:00 2001 From: zhou-hao Date: Mon, 18 Dec 2017 17:56:53 +0800 Subject: [PATCH] volatile --- .../hswebframework/web/dao/mybatis/utils/ResultMapsUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/src/main/java/org/hswebframework/web/dao/mybatis/utils/ResultMapsUtils.java b/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/src/main/java/org/hswebframework/web/dao/mybatis/utils/ResultMapsUtils.java index 5c1355022..e7794862b 100644 --- a/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/src/main/java/org/hswebframework/web/dao/mybatis/utils/ResultMapsUtils.java +++ b/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/src/main/java/org/hswebframework/web/dao/mybatis/utils/ResultMapsUtils.java @@ -28,7 +28,7 @@ import java.util.concurrent.CountDownLatch; * @since 2.0 */ public class ResultMapsUtils { - private static SqlSession sqlSession; + private volatile static SqlSession sqlSession; private static CountDownLatch countDownLatch = new CountDownLatch(1); @@ -37,6 +37,7 @@ public class ResultMapsUtils { try { countDownLatch.await(); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); throw new UnsupportedOperationException(e); } if (sqlSession == null) {