소스 검색

返回new map

zhou-hao 5 년 전
부모
커밋
fd16374b91
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      hsweb-commons/hsweb-commons-utils/src/main/java/org/hswebframework/web/ThreadLocalUtils.java

+ 1 - 1
hsweb-commons/hsweb-commons-utils/src/main/java/org/hswebframework/web/ThreadLocalUtils.java

@@ -48,7 +48,7 @@ public final class ThreadLocalUtils {
      * @return threadLocal中的全部值
      */
     public static Map<String, Object> getAll() {
-        return local.get();
+        return new HashMap<>(local.get());
     }
 
     /**