From 3dc789863ef0055c0faa20e542da0e413e1d45dc Mon Sep 17 00:00:00 2001 From: ghidravore Date: Tue, 19 May 2020 16:56:22 -0400 Subject: [PATCH] changes from review --- .../java/ghidra/program/database/DBObjectCache.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/DBObjectCache.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/DBObjectCache.java index 590bc2fd9c..90f3e604e2 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/DBObjectCache.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/DBObjectCache.java @@ -28,7 +28,7 @@ import ghidra.program.model.address.KeyRange; /** * Generic cache implementation for objects that extend DatabaseObject. This is a reference based * cache such that objects are only ever automatically removed from the cache when there are no - * references to that object. It also maintains small "hard" cache so that recently accessed objects + * references to that object. It also maintains a small "hard" cache so that recently accessed objects * are not prematurely removed from the cache if there are no references to them. * * @param The type of the object stored in this cache @@ -143,18 +143,18 @@ public class DBObjectCache { */ public synchronized List getCachedObjects() { ArrayList list = new ArrayList(); + processQueue(); for (KeyedSoftReference ref : map.values()) { T obj = ref.get(); if (obj != null) { list.add(obj); } } - processQueue(); return list; } /** - * Delete all objects from hashTable whose key is contained + * Delete all objects from HashMap whose key is contained * within the specified keyRanges. * @param keyRanges key ranges to delete */ @@ -171,7 +171,7 @@ public class DBObjectCache { } /** - * Delete all objects from hashTable whose key is contained + * Delete all objects from cache whose key is contained * within the specified keyRanges. Iteration over all * keys contained within keyRanges will be performed. * @param keyRanges key ranges to delete @@ -192,9 +192,9 @@ public class DBObjectCache { } /** - * Delete all objects from hashTable whose key is contained + * Delete all objects from cache whose key is contained * within the specified keyRanges. Iteration over all - * keys contained within hashTable will be performed. + * keys contained within map will be performed. * @param keyRanges key ranges to delete */ private void deleteLargeKeyRanges(List keyRanges) {