疯狂的狮子Li
2024-01-25 591331b70cbc47eee427b50e3216f3e3519a2e83
update 优化 !pr485 代码变量
已修改1个文件
7 ■■■■■ 文件已修改
ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/factory/OssFactory.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;