ServiceBaseImpl.instanceOfCache is a collection that only grows and never has elements removed. findbugs flags this as a 'scary' error therefore I'm changing it from a HashMap to a WeakHashMap.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@113199 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2015-09-28 11:58:55 +00:00
parent bb9e6a473b
commit bb4dced286

View File

@@ -18,9 +18,9 @@
*/
package org.alfresco.module.org_alfresco_module_rm.util;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
@@ -443,7 +443,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
return instanceOf(className, ofClassName);
}
private static Map<String, Boolean> instanceOfCache = new HashMap<String, Boolean>();
private static Map<String, Boolean> instanceOfCache = new WeakHashMap<>();
/**
* Utility method to quickly determine whether one class is equal to or sub of another.