This commit is contained in:
Chris Hegarty 2014-12-03 19:28:35 +00:00
commit 43842f6349
324 changed files with 8546 additions and 2493 deletions

View file

@ -28,7 +28,7 @@ package java.util.jar;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.Collection;
@ -47,6 +47,9 @@ import sun.misc.ASCIICaseInsensitiveComparator;
* <a href="../../../../technotes/guides/jar/jar.html">JAR File Specification</a>
* for more information about valid attribute names and values.
*
* <p>This map and its views have a predictable iteration order, namely the
* order that keys were inserted into the map, as with {@link LinkedHashMap}.
*
* @author David Connelly
* @see Manifest
* @since 1.2
@ -71,7 +74,7 @@ public class Attributes implements Map<Object,Object>, Cloneable {
* @param size the initial number of attributes
*/
public Attributes(int size) {
map = new HashMap<>(size);
map = new LinkedHashMap<>(size);
}
/**
@ -81,7 +84,7 @@ public class Attributes implements Map<Object,Object>, Cloneable {
* @param attr the specified Attributes
*/
public Attributes(Attributes attr) {
map = new HashMap<>(attr);
map = new LinkedHashMap<>(attr);
}