ijuma commented on a change in pull request #9874:
URL: https://github.com/apache/kafka/pull/9874#discussion_r556549733



##########
File path: clients/src/main/java/org/apache/kafka/common/utils/Utils.java
##########
@@ -753,22 +754,7 @@ public static ByteBuffer ensureCapacity(ByteBuffer 
existingBuffer, int newLength
      * @return An entry
      */
     public static <K, V> Map.Entry<K, V> mkEntry(final K k, final V v) {
-        return new Map.Entry<K, V>() {
-            @Override
-            public K getKey() {
-                return k;
-            }
-
-            @Override
-            public V getValue() {
-                return v;
-            }
-
-            @Override
-            public V setValue(final V value) {
-                throw new UnsupportedOperationException();
-            }
-        };
+        return new AbstractMap.SimpleEntry<>(k, v);

Review comment:
       The previous implementation did not implement `equals`, which caused one 
test to fail.




----------------------------------------------------------------
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


Reply via email to