This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 82d91299f Update testMapEntry() for LANG-1736
82d91299f is described below

commit 82d91299f3b88ed50e80c75d6d4385e60d726bc2
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed May 22 11:27:09 2024 -0400

    Update testMapEntry() for LANG-1736
---
 src/test/java/org/apache/commons/lang3/tuple/PairTest.java | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/test/java/org/apache/commons/lang3/tuple/PairTest.java 
b/src/test/java/org/apache/commons/lang3/tuple/PairTest.java
index 134adb2bd..3675e6abe 100644
--- a/src/test/java/org/apache/commons/lang3/tuple/PairTest.java
+++ b/src/test/java/org/apache/commons/lang3/tuple/PairTest.java
@@ -134,6 +134,15 @@ public class PairTest extends AbstractLangTest {
         final Entry<Integer, String> entry = map.entrySet().iterator().next();
         assertEquals(pair, entry);
         assertEquals(pair.hashCode(), entry.hashCode());
+        // LANG-1736:
+        map.clear();
+        map.put(0, "value1");
+        map.put(1, "value2");
+        map.entrySet().forEach(e -> {
+            final Pair<Integer, String> p = ImmutablePair.of(e.getKey(), 
e.getValue());
+            assertEquals(p, e);
+            assertEquals(p.hashCode(), e.hashCode());
+        });
     }
 
     @Test

Reply via email to