From ba1a540add437649bae209ba8a8b44f2e2d95451 Mon Sep 17 00:00:00 2001 From: dhb52 <dhb52@126.com> Date: 星期五, 24 五月 2024 13:30:51 +0800 Subject: [PATCH] !542 更新SnailJob版本到1.0.0-beta2 * feat: 配置项变更,避免误解snail-job.group-name => snail-job.group * chore: 更新snail-job版本到1.0.0-beta2 --- ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/factory/OssFactory.java | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/factory/OssFactory.java b/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/factory/OssFactory.java index f0760f7..d70270a 100644 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/factory/OssFactory.java +++ b/ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/factory/OssFactory.java @@ -24,8 +24,7 @@ public class OssFactory { private static final Map<String, OssClient> CLIENT_CACHE = new ConcurrentHashMap<>(); - - private static final ReentrantLock lock = new ReentrantLock(); + private static final ReentrantLock LOCK = new ReentrantLock(); /** * 鑾峰彇榛樿瀹炰緥 @@ -53,7 +52,7 @@ OssClient client = CLIENT_CACHE.get(key); // 瀹㈡埛绔笉瀛樺湪鎴栭厤缃笉鐩稿悓鍒欓噸鏂版瀯寤� if (client == null || !client.checkPropertiesSame(properties)) { - lock.lock(); + LOCK.lock(); try { client = CLIENT_CACHE.get(key); if (client == null || !client.checkPropertiesSame(properties)) { @@ -62,7 +61,7 @@ return CLIENT_CACHE.get(key); } } finally { - lock.unlock(); + LOCK.unlock(); } } return client; -- Gitblit v1.9.3