src/share/classes/java/util/HashMap.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -228,11 +228,11 @@
while (capacity < initialCapacity)
capacity <<= 1;
this.loadFactor = loadFactor;
threshold = (int)Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
- table = new Entry[capacity];
+ table = new Entry<?,?>[capacity];
init();
}
/**
* Constructs an empty <tt>HashMap</tt> with the specified initial
@@ -1076,11 +1076,11 @@
// find smallest power of two which holds all mappings
while (capacity < initialCapacity) {
capacity <<= 1;
}
- table = new Entry[capacity];
+ table = new Entry<?,?>[capacity];
threshold = (int) Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
init(); // Give subclass a chance to do its thing.
// Read the keys and values, and put the mappings in the HashMap