Ethanlm commented on a change in pull request #3222: STORM-3596 use send assignment status in blacklist scheduling URL: https://github.com/apache/storm/pull/3222#discussion_r405054634
########## File path: storm-client/src/jvm/org/apache/storm/utils/RotatingMap.java ########## @@ -84,6 +86,37 @@ public V get(K key) { return null; } + /** + * Returns the value to which the specified key is mapped, or + * {@code defaultValue} if this map contains no mapping for the key. + * + * @param key the key whose associated value is to be returned + * @param defaultValue the default mapping of the key + * @return the value to which the specified key is mapped, or + * {@code defaultValue} if this map contains no mapping for the key + */ + public V getOrDefault(K key, V defaultValue) { + for (HashMap<K, V> bucket : buckets) { Review comment: Can we call above `public V get(K key)` instead of repeating the code? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services