소스 검색

WeakRefCloneAssetCache: remove useless "synchronized" (the map is already thread-safe)

shadowislord 10 년 전
부모
커밋
a3467def1e
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      jme3-core/src/main/java/com/jme3/asset/cache/WeakRefCloneAssetCache.java

+ 1 - 5
jme3-core/src/main/java/com/jme3/asset/cache/WeakRefCloneAssetCache.java

@@ -155,11 +155,7 @@ public class WeakRefCloneAssetCache implements AssetCache {
     }
 
     public <T> T getFromCache(AssetKey<T> key) {
-        AssetRef smartInfo;
-        synchronized (smartCache){
-            smartInfo = smartCache.get(key);
-        }
-        
+        AssetRef smartInfo = smartCache.get(key);
         if (smartInfo == null) {
             return null;
         } else {