nbronson / snaptree

Concurrent TreeMap w/ efficient support for clone() and consistent iteration
Other
148 stars 30 forks source link

remove(key, val) fails with NPE if key does not exist in map #7

Open svladykin opened 11 years ago

svladykin commented 11 years ago

It seems that in some places it is needed to return noUpdateResult(func, null) instead of just null. Test case:

SnapTreeMap<Integer, Integer> m = new SnapTreeMap<Integer, Integer>();
m.put(5, 15);
m.remove(10, 10);