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

Comparing jsr166/src/main/java/util/HashMap.java (file contents):
Revision 1.6 by jsr166, Thu Jul 5 15:18:56 2018 UTC vs.
Revision 1.9 by jsr166, Sun Nov 11 16:27:28 2018 UTC

# Line 34 | Line 34 | import java.util.function.BiConsumer;
34   import java.util.function.BiFunction;
35   import java.util.function.Consumer;
36   import java.util.function.Function;
37 < import jdk.internal.misc.SharedSecrets;
37 > // OPENJDK import jdk.internal.access.SharedSecrets;
38  
39   /**
40   * Hash table based implementation of the {@code Map} interface.  This
# Line 118 | Line 118 | import jdk.internal.misc.SharedSecrets;
118   * should be used only to detect bugs.</i>
119   *
120   * <p>This class is a member of the
121 < * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
121 > * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
122   * Java Collections Framework</a>.
123   *
124   * @param <K> the type of keys maintained by this map
# Line 1444 | Line 1444 | public class HashMap<K,V> extends Abstra
1444  
1445              // Check Map.Entry[].class since it's the nearest public type to
1446              // what we're actually creating.
1447 <            SharedSecrets.getJavaObjectInputStreamAccess().checkArray(s, Map.Entry[].class, cap);
1447 >            jsr166.Platform.checkArray(s, Map.Entry[].class, cap);
1448              @SuppressWarnings({"rawtypes","unchecked"})
1449              Node<K,V>[] tab = (Node<K,V>[])new Node[cap];
1450              table = tab;
# Line 2145 | Line 2145 | public class HashMap<K,V> extends Abstra
2145              if (replacement != p) {
2146                  TreeNode<K,V> pp = replacement.parent = p.parent;
2147                  if (pp == null)
2148 <                    root = replacement;
2148 >                    (root = replacement).red = false;
2149                  else if (p == pp.left)
2150                      pp.left = replacement;
2151                  else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines