Jason918 edited a comment on issue #12723: URL: https://github.com/apache/pulsar/issues/12723#issuecomment-965011704
I found another interesting thing is that in org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap, if we call `map.put(key, null)`, it throws an NullPointerException. But we can use `map.computeIfAbsent(key, k->null)` to insert a null value into the map, which leads to a confusing situation that `map.containsKey(key)` is falsse, but there is actually a "key" in the map with null value. Not the same behavior in java.util.concurrent.ConcurrentHashMap, a key with null value will be dismissed. -- 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]
