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

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.258 by dl, Sat Oct 25 18:04:44 2014 UTC vs.
Revision 1.259 by dl, Mon Dec 22 12:58:17 2014 UTC

# Line 1027 | Line 1027 | public class ConcurrentHashMap<K,V> exte
1027                                      p.val = value;
1028                              }
1029                          }
1030 +                        else if (f instanceof ReservationNode)
1031 +                            throw new IllegalStateException("Recursive update");
1032                      }
1033                  }
1034                  if (binCount != 0) {
# Line 1129 | Line 1131 | public class ConcurrentHashMap<K,V> exte
1131                                  }
1132                              }
1133                          }
1134 +                        else if (f instanceof ReservationNode)
1135 +                            throw new IllegalStateException("Recursive update");
1136                      }
1137                  }
1138                  if (validated) {
# Line 1657 | Line 1661 | public class ConcurrentHashMap<K,V> exte
1661                                  Node<K,V> pred = e;
1662                                  if ((e = e.next) == null) {
1663                                      if ((val = mappingFunction.apply(key)) != null) {
1664 +                                        if (pred.next != null)
1665 +                                            throw new IllegalStateException("Recursive update");
1666                                          added = true;
1667                                          pred.next = new Node<K,V>(h, key, val, null);
1668                                      }
# Line 1676 | Line 1682 | public class ConcurrentHashMap<K,V> exte
1682                                  t.putTreeVal(h, key, val);
1683                              }
1684                          }
1685 +                        else if (f instanceof ReservationNode)
1686 +                            throw new IllegalStateException("Recursive update");
1687                      }
1688                  }
1689                  if (binCount != 0) {
# Line 1771 | Line 1779 | public class ConcurrentHashMap<K,V> exte
1779                                  }
1780                              }
1781                          }
1782 +                        else if (f instanceof ReservationNode)
1783 +                            throw new IllegalStateException("Recursive update");
1784                      }
1785                  }
1786                  if (binCount != 0)
# Line 1862 | Line 1872 | public class ConcurrentHashMap<K,V> exte
1872                                  if ((e = e.next) == null) {
1873                                      val = remappingFunction.apply(key, null);
1874                                      if (val != null) {
1875 +                                        if (pred.next != null)
1876 +                                            throw new IllegalStateException("Recursive update");
1877                                          delta = 1;
1878                                          pred.next =
1879                                              new Node<K,V>(h, key, val, null);
# Line 1894 | Line 1906 | public class ConcurrentHashMap<K,V> exte
1906                                      setTabAt(tab, i, untreeify(t.first));
1907                              }
1908                          }
1909 +                        else if (f instanceof ReservationNode)
1910 +                            throw new IllegalStateException("Recursive update");
1911                      }
1912                  }
1913                  if (binCount != 0) {
# Line 2003 | Line 2017 | public class ConcurrentHashMap<K,V> exte
2017                                      setTabAt(tab, i, untreeify(t.first));
2018                              }
2019                          }
2020 +                        else if (f instanceof ReservationNode)
2021 +                            throw new IllegalStateException("Recursive update");
2022                      }
2023                  }
2024                  if (binCount != 0) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines