OSS Factory 代码优化

v1.4.1
hiparker 4 years ago
parent 6084e7b29a
commit c2b047b0e5

@ -42,7 +42,7 @@ public enum OssStorageFactory {
INSTANCE; INSTANCE;
/** OSS 服务容器 */ /** OSS 服务容器 */
private final Map<OssStorageType, OssStorageService> ossStorageServiceMap = Maps.newHashMap(); private final Map<OssStorageType, OssStorageService> ossStorageServiceMap;
/** /**
* OSS * OSS
@ -79,8 +79,8 @@ public enum OssStorageFactory {
* *
*/ */
OssStorageFactory(){ OssStorageFactory(){
// 清空执行器集合 // 初始化容器
ossStorageServiceMap.clear(); ossStorageServiceMap = Maps.newHashMap();
// 拿到实现了 OssStorageService 接口的,所有子类 // 拿到实现了 OssStorageService 接口的,所有子类
Set<Class<?>> clazzSet = ClassUtil.scanPackageBySuper( Set<Class<?>> clazzSet = ClassUtil.scanPackageBySuper(

Loading…
Cancel
Save