fix LongLongHashMap.forEachOrdered for negative values

This commit is contained in:
2019-09-07 16:51:30 +02:00
parent 4d92197423
commit 452ef2020d
2 changed files with 51 additions and 0 deletions

View File

@@ -283,6 +283,9 @@ public class LongLongHashMap {
consumer.accept(key, get(key));
} else if (key == EMPTY_SLOT) {
final int posFirstKey = findPosOfFirstPositiveKey(sortedKeys);
if (posFirstKey < 0) {
return;
}
i = posFirstKey - 1;
}
}