# | Line 1224 | Line 1224 | public class ConcurrentHashMap<K, V> ext | |
---|---|---|
1224 | } | |
1225 | ||
1226 | final HashEntry<K,V> nextEntry() { | |
1227 | < | HashEntry<K,V> e = lastReturned = nextEntry; |
1227 | > | HashEntry<K,V> e = nextEntry; |
1228 | if (e == null) | |
1229 | throw new NoSuchElementException(); | |
1230 | + | lastReturned = e; // cannot assign until after null check |
1231 | if ((nextEntry = e.next) == null) | |
1232 | advance(); | |
1233 | return e; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |