ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/TreeMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/TreeMap.java (file contents):
Revision 1.43 by jsr166, Sun May 20 07:54:01 2007 UTC vs.
Revision 1.44 by jsr166, Mon May 21 20:23:38 2007 UTC

# Line 1111 | Line 1111 | public class TreeMap<K,V>
1111          }
1112  
1113          final Entry<K,V> nextEntry() {
1114 <            Entry<K,V> e = lastReturned = next;
1114 >            Entry<K,V> e = next;
1115              if (e == null)
1116                  throw new NoSuchElementException();
1117              if (modCount != expectedModCount)
1118                  throw new ConcurrentModificationException();
1119              next = successor(e);
1120 +            lastReturned = e;
1121              return e;
1122          }
1123  
1124          final Entry<K,V> prevEntry() {
1125 <            Entry<K,V> e = lastReturned= next;
1125 >            Entry<K,V> e = next;
1126              if (e == null)
1127                  throw new NoSuchElementException();
1128              if (modCount != expectedModCount)
1129                  throw new ConcurrentModificationException();
1130              next = predecessor(e);
1131 +            lastReturned = e;
1132              return e;
1133          }
1134  
# Line 1587 | Line 1589 | public class TreeMap<K,V>
1589              }
1590  
1591              final TreeMap.Entry<K,V> nextEntry() {
1592 <                TreeMap.Entry<K,V> e = lastReturned = next;
1592 >                TreeMap.Entry<K,V> e = next;
1593                  if (e == null || e.key == fenceKey)
1594                      throw new NoSuchElementException();
1595                  if (m.modCount != expectedModCount)
1596                      throw new ConcurrentModificationException();
1597                  next = successor(e);
1598 +                lastReturned = e;
1599                  return e;
1600              }
1601  
1602              final TreeMap.Entry<K,V> prevEntry() {
1603 <                TreeMap.Entry<K,V> e = lastReturned = next;
1603 >                TreeMap.Entry<K,V> e = next;
1604                  if (e == null || e.key == fenceKey)
1605                      throw new NoSuchElementException();
1606                  if (m.modCount != expectedModCount)
1607                      throw new ConcurrentModificationException();
1608                  next = predecessor(e);
1609 +                lastReturned = e;
1610                  return e;
1611              }
1612  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines