shapesecurity / shape-functional-java

add some FP familiarity to a Java project
Apache License 2.0
8 stars 7 forks source link

Populated and cleared HashTables fail to iterate #69

Closed Protryon closed 5 years ago

Protryon commented 5 years ago

See test:

HashTable<String, String> table = HashTable.emptyUsingEquality();
        table = table.put("key1", "value1")
            .put("key2", "value2")
            .put("key3", "value3");

        table = table.remove("key1")
            .remove("key2")
            .remove("key3");

        for (Pair<String, String> pair : table) {
        }

fails with an ArrayIndexOutOfBoundsException.