Radiancebobo commented on code in PR #3706:
URL: https://github.com/apache/bookkeeper/pull/3706#discussion_r1051795342
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java:
##########
@@ -382,6 +382,9 @@ V get(long key, int keyHash) {
}
V put(long key, V value, int keyHash, boolean onlyIfAbsent,
LongFunction<V> valueProvider) {
+ if (value == null) {
Review Comment:
But I feel that it is more appropriate to do the verification in the put
function, because this problem exists in
```org.apache.bookkeeper.util.collections.ConcurrentLongHashMap.Section#put```
, not the caller ```ConcurrentLongHashMap#computeIfAbsent```
--
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]