# | Line 556 | Line 556 | public class TreeMap<K,V> | |
---|---|---|
556 | Entry<K,V> t = root; | |
557 | ||
558 | if (t == null) { | |
559 | + | if (key == null) { |
560 | + | if (comparator == null) |
561 | + | throw new NullPointerException(); |
562 | + | comparator.compare(key, key); |
563 | + | } |
564 | incrementSize(); | |
565 | root = new Entry<K,V>(key, value, null); | |
566 | return null; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |