Skip to content

Commit 67e69b3

Browse files
committed
Test empty TreeMap hashCode
1 parent 5e2374b commit 67e69b3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

core/src/test/java/fj/data/TreeMapTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,11 @@ public void minKey() {
122122
assertThat(t2.delete(0).minKey(), equalTo(some(1)));
123123
}
124124

125+
public void emptyHashCode() {
126+
// Hash code of tree map should not throw NullPointerException
127+
// see https://github.com/functionaljava/functionaljava/issues/187
128+
int i = TreeMap.empty(Ord.stringOrd).hashCode();
129+
assertTrue(true);
130+
}
131+
125132
}

0 commit comments

Comments
 (0)