jbertram commented on code in PR #5771: URL: https://github.com/apache/activemq-artemis/pull/5771#discussion_r2140985805
########## artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashMap.java: ########## @@ -289,12 +290,12 @@ V put(long key, V value, int keyHash, boolean onlyIfAbsent, LongFunction<V> valu if (storedKey == key) { if (storedValue == EmptyValue) { - values[bucket] = value != null ? value : (valueProvider != null ? valueProvider.apply(key) : null); + values[bucket] = Objects.requireNonNullElse(value, (valueProvider != null ? valueProvider.apply(key) : null)); Review Comment: When I first pushed I didn't realize that the default couldn't be `null`. :laughing: -- 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: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact