fixed formatting in DbObjectCache

This commit is contained in:
ghidravore 2020-05-20 13:25:01 -04:00
parent 1675f226b3
commit 3dbf930578

View File

@ -199,19 +199,18 @@ public class DBObjectCache<T extends DatabaseObject> {
* @param keyRanges key ranges to delete
*/
private void deleteLargeKeyRanges(List<KeyRange> keyRanges) {
//@formatter:off
map.keySet().stream()
.filter(key -> keyRangesContain(keyRanges, key))
.collect(Collectors.toList())
.forEach(key -> {
KeyedSoftReference ref = map.remove(key);
DatabaseObject obj = ref.get();
if (obj != null) {
obj.setDeleted();
ref.clear();
}
});
//@formatter:on
map.keySet()
.stream()
.filter(key -> keyRangesContain(keyRanges, key))
.collect(Collectors.toList())
.forEach(key -> {
KeyedSoftReference ref = map.remove(key);
DatabaseObject obj = ref.get();
if (obj != null) {
obj.setDeleted();
ref.clear();
}
});
}
/**
@ -281,12 +280,11 @@ public class DBObjectCache<T extends DatabaseObject> {
}
}
else {
//@formatter:off
map.keySet().stream()
.filter(key -> (key >= startKey && key <= endKey))
.collect(Collectors.toList())
.forEach(key -> doInvalidate(key));
//@formatter:on
map.keySet()
.stream()
.filter(key -> (key >= startKey && key <= endKey))
.collect(Collectors.toList())
.forEach(key -> doInvalidate(key));
}
}