ctubbsii commented on code in PR #33:
URL:
https://github.com/apache/accumulo-classloaders/pull/33#discussion_r2696057191
##########
modules/local-caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/util/DeduplicationCache.java:
##########
@@ -75,4 +76,9 @@ public boolean anyMatch(final Predicate<KEY> keyPredicate) {
return
canonicalWeakValuesCache.asMap().keySet().stream().anyMatch(keyPredicate);
}
+ public void values(final BiConsumer<KEY,VALUE> consumer) {
Review Comment:
Also, this consumer may encounter null values, because the prior cleanup
task doesn't guarantee that a weakly referenced value stays non-null by the
time it reaches the consumer. We can wrap the user-provided consumer with an
internal one that delegates the non-null ones to the user-provided consumer and
ignores the nulls.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]