You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BTreeMap<Integer, Integer> map = BTreeMap.create();
for (inti = 0; i < 1000; i++) {
map.put(i, i);
}
for (inti = 0; i < 481; i++) {
map.remove(i);
}
map.get(481); // this line fails with NullPointerException
fails with exception:
Exception in thread "main" java.lang.NullPointerException
at uk.co.omegaprime.btreemap.BTreeMap$Internal.find(BTreeMap.java:221)
at uk.co.omegaprime.btreemap.BTreeMap.findLeaf(BTreeMap.java:491)
at uk.co.omegaprime.btreemap.BTreeMap.getOrDefault(BTreeMap.java:501)
at uk.co.omegaprime.btreemap.BTreeMap.get(BTreeMap.java:470)
at Test.main(Test.java:22)
The text was updated successfully, but these errors were encountered:
This code:
fails with exception:
The text was updated successfully, but these errors were encountered: