Skip to content

Commit

Permalink
fix NPE in CacheSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 16, 2022
1 parent e03661c commit 56f7f98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.number
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Mon Nov 28 19:33:16 CET 2022
build.number=48
#Fri Dec 16 09:13:01 CET 2022
build.number=49
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public List<String> keys(CacheEntryFilter filter) throws IOException {
while (it.hasNext()) {
key = it.next();
entry = getQuiet(key, null);
if (all || filter.accept(entry)) list.add(key);
if (entry != null && (all || filter.accept(entry))) list.add(key);
}
return list;
}
Expand All @@ -44,7 +44,7 @@ public List<CacheEntry> entries(CacheEntryFilter filter) throws IOException {
CacheEntry entry;
while (it.hasNext()) {
entry = it.next();
if (entry != null && filter.accept(entry)) {
if (entry != null && (filter == null || filter.accept(entry))) {
list.add(entry);
}
}
Expand All @@ -65,7 +65,7 @@ public List values(CacheEntryFilter filter) throws IOException {
while (it.hasNext()) {
key = it.next();
entry = getQuiet(key, null);
if (filter.accept(entry)) list.add(entry.getValue());
if (entry != null && (filter == null || filter.accept(entry))) list.add(entry.getValue());
}
return list;
}
Expand All @@ -85,7 +85,7 @@ public int remove(CacheEntryFilter filter) throws IOException {
while (it.hasNext()) {
key = it.next();
entry = getQuiet(key, null);
if (filter == null || filter.accept(entry)) {
if (entry != null && (filter == null || filter.accept(entry))) {
remove(key);
count++;
}
Expand Down

0 comments on commit 56f7f98

Please sign in to comment.