--- old/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java 2012-01-29 19:33:29.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java 2012-01-29 19:33:29.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -1063,12 +1063,11 @@ * Returns the current environment. * @return Environment. */ - @SuppressWarnings("unchecked") public Hashtable getEnvironment() throws NamingException { if (_env == null) { return new Hashtable<>(5, 0.75f); } else { - return (Hashtable)_env.clone(); + return _env.clone(); } } @@ -1090,7 +1089,6 @@ * @param propVal The ORB. * @return the previous value of this property if any. */ - @SuppressWarnings("unchecked") public java.lang.Object addToEnvironment(String propName, java.lang.Object propValue) throws NamingException { @@ -1098,19 +1096,18 @@ _env = new Hashtable<>(7, 0.75f); } else { // copy-on-write - _env = (Hashtable)_env.clone(); + _env = _env.clone(); } return _env.put(propName, propValue); } // Record change but do not reinitialize ORB - @SuppressWarnings("unchecked") public java.lang.Object removeFromEnvironment(String propName) throws NamingException { if (_env != null && _env.get(propName) != null) { // copy-on-write - _env = (Hashtable)_env.clone(); + _env = _env.clone(); return _env.remove(propName); } return null; --- old/src/share/classes/com/sun/jndi/dns/DnsContext.java 2012-01-29 19:33:29.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/dns/DnsContext.java 2012-01-29 19:33:29.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -191,7 +191,7 @@ return environment.put(propName, propVal); } else if (environment.get(propName) != propVal) { // copy on write - environment = (Hashtable) environment.clone(); + environment = environment.clone(); envShared = false; return environment.put(propName, propVal); } else { @@ -225,7 +225,7 @@ return environment.remove(propName); } else if (environment.get(propName) != null) { // copy-on-write - environment = (Hashtable) environment.clone(); + environment = environment.clone(); envShared = false; return environment.remove(propName); } else { --- old/src/share/classes/com/sun/jndi/ldap/LdapAttribute.java 2012-01-29 19:33:30.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/ldap/LdapAttribute.java 2012-01-29 19:33:29.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -50,10 +50,9 @@ private String baseCtxURL; private Hashtable baseCtxEnv; - @SuppressWarnings("unchecked") // clone() public Object clone() { LdapAttribute attr = new LdapAttribute(this.attrID, baseCtx, rdn); - attr.values = (Vector)values.clone(); + attr.values = values.clone(); return attr; } @@ -163,7 +162,7 @@ //of the environment. cloning is expensive, so we only do //it if we have to. if(secureEnv == null) { - secureEnv = (Hashtable)realEnv.clone(); + secureEnv = realEnv.clone(); } secureEnv.remove(key); } --- old/src/share/classes/com/sun/jndi/ldap/LdapCtx.java 2012-01-29 19:33:30.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/ldap/LdapCtx.java 2012-01-29 19:33:30.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -2146,11 +2146,10 @@ return envprops; } - @SuppressWarnings("unchecked") // clone() public Hashtable getEnvironment() throws NamingException { return (envprops == null ? new Hashtable(5, 0.75f) - : (Hashtable)envprops.clone()); + : envprops.clone()); } @SuppressWarnings("unchecked") // clone() @@ -2224,7 +2223,7 @@ } // Update environment; reconnection will use new props - envprops = (Hashtable)envprops.clone(); + envprops = envprops.clone(); return envprops.remove(propName); } @@ -2301,7 +2300,7 @@ // Update environment; reconnection will use new props envprops = (envprops == null ? new Hashtable(5, 0.75f) - : (Hashtable)envprops.clone()); + : envprops.clone()); return envprops.put(propName, propVal); } @@ -2648,12 +2647,11 @@ */ } - @SuppressWarnings("unchecked") // clone() public void reconnect(Control[] connCtls) throws NamingException { // Update environment envprops = (envprops == null ? new Hashtable(5, 0.75f) - : (Hashtable)envprops.clone()); + : envprops.clone()); if (connCtls == null) { envprops.remove(BIND_CONTROLS); --- old/src/share/classes/com/sun/jndi/ldap/LdapName.java 2012-01-29 19:33:30.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/ldap/LdapName.java 2012-01-29 19:33:30.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -98,10 +98,9 @@ * Constructs an LDAP name given its parsed components and, optionally * (if "name" is not null), the unparsed DN. */ - @SuppressWarnings("unchecked") // clone() private LdapName(String name, Vector rdns) { unparsed = name; - this.rdns = (Vector)rdns.clone(); + this.rdns = rdns.clone(); } /* --- old/src/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java 2012-01-29 19:33:31.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java 2012-01-29 19:33:31.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -96,9 +96,8 @@ * won't close the other). */ // %%% Alternatively, this could be done with a clone() method. - @SuppressWarnings("unchecked") // clone() RegistryContext(RegistryContext ctx) { - environment = (Hashtable)ctx.environment.clone(); + environment = ctx.environment.clone(); registry = ctx.registry; host = ctx.host; port = ctx.port; @@ -297,9 +296,8 @@ return environment.put(propName, propVal); } - @SuppressWarnings("unchecked") // clone() public Hashtable getEnvironment() throws NamingException { - return (Hashtable)environment.clone(); + return environment.clone(); } public void close() { --- old/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java 2012-01-29 19:33:32.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java 2012-01-29 19:33:32.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -452,7 +452,7 @@ throws NamingException { myEnv = (myEnv == null) ? new Hashtable(11, 0.75f) - : (Hashtable)myEnv.clone(); + : myEnv.clone(); return myEnv.put(propName, propVal); } @@ -463,7 +463,7 @@ if (myEnv == null) return null; - myEnv = (Hashtable)myEnv.clone(); + myEnv = myEnv.clone(); return myEnv.remove(propName); } @@ -472,7 +472,7 @@ if (myEnv == null) { return new Hashtable<>(5, 0.75f); } else { - return (Hashtable)myEnv.clone(); + return myEnv.clone(); } } --- old/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java 2012-01-29 19:33:32.000000000 -0800 +++ new/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java 2012-01-29 19:33:32.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -494,7 +494,7 @@ if (myEnv == null) { return null; } - myEnv = (Hashtable)myEnv.clone(); + myEnv = myEnv.clone(); return myEnv.remove(propName); } @@ -503,7 +503,7 @@ throws NamingException { myEnv = (myEnv == null) ? new Hashtable(11, 0.75f) - : (Hashtable)myEnv.clone(); + : myEnv.clone(); return myEnv.put(propName, propVal); } @@ -512,7 +512,7 @@ if (myEnv == null) { return new Hashtable<>(5, 0.75f); } else { - return (Hashtable)myEnv.clone(); + return myEnv.clone(); } } --- old/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpecList.java 2012-01-29 19:33:33.000000000 -0800 +++ new/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpecList.java 2012-01-29 19:33:32.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -140,48 +140,47 @@ // -------- notify routines -------------------- - @SuppressWarnings("unchecked") - private Vector specListeners() { - return (Vector)runtime.specListeners.clone(); + private ArrayList specListeners() { + return runtime.specListeners.clone(); } void notifySet(EventRequestSpec spec) { - Vector l = specListeners(); + List l = specListeners(); SpecEvent evt = new SpecEvent(spec); for (int i = 0; i < l.size(); i++) { - spec.notifySet(l.elementAt(i), evt); + spec.notifySet(l.get(i), evt); } } void notifyDeferred(EventRequestSpec spec) { - Vector l = specListeners(); + List l = specListeners(); SpecEvent evt = new SpecEvent(spec); for (int i = 0; i < l.size(); i++) { - spec.notifyDeferred(l.elementAt(i), evt); + spec.notifyDeferred(l.get(i), evt); } } void notifyDeleted(EventRequestSpec spec) { - Vector l = specListeners(); + List l = specListeners(); SpecEvent evt = new SpecEvent(spec); for (int i = 0; i < l.size(); i++) { - spec.notifyDeleted(l.elementAt(i), evt); + spec.notifyDeleted(l.get(i), evt); } } void notifyResolved(EventRequestSpec spec) { - Vector l = specListeners(); + List l = specListeners(); SpecEvent evt = new SpecEvent(spec); for (int i = 0; i < l.size(); i++) { - spec.notifyResolved(l.elementAt(i), evt); + spec.notifyResolved(l.get(i), evt); } } void notifyError(EventRequestSpec spec, Exception exc) { - Vector l = specListeners(); + List l = specListeners(); SpecErrorEvent evt = new SpecErrorEvent(spec, exc); for (int i = 0; i < l.size(); i++) { - spec.notifyError(l.elementAt(i), evt); + spec.notifyError(l.get(i), evt); } } } --- old/src/share/classes/java/util/ArrayList.java 2012-01-29 19:33:33.000000000 -0800 +++ new/src/share/classes/java/util/ArrayList.java 2012-01-29 19:33:33.000000000 -0800 @@ -1,5 +1,5 @@ /* - * 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 @@ -298,7 +298,8 @@ * * @return a clone of this ArrayList instance */ - public Object clone() { + @Override + public ArrayList clone() { try { @SuppressWarnings("unchecked") ArrayList v = (ArrayList) super.clone(); --- old/src/share/classes/java/util/BitSet.java 2012-01-29 19:33:34.000000000 -0800 +++ new/src/share/classes/java/util/BitSet.java 2012-01-29 19:33:33.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -1082,11 +1082,13 @@ * @return a clone of this bit set * @see #size() */ - public Object clone() { + @Override + public BitSet clone() { if (! sizeIsSticky) trimToSize(); try { + @SuppressWarnings("unchecked") BitSet result = (BitSet) super.clone(); result.words = words.clone(); result.checkInvariants(); --- old/src/share/classes/java/util/EnumSet.java 2012-01-29 19:33:34.000000000 -0800 +++ new/src/share/classes/java/util/EnumSet.java 2012-01-29 19:33:34.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -358,9 +358,12 @@ * * @return a copy of this set */ + @Override public EnumSet clone() { try { - return (EnumSet) super.clone(); + @SuppressWarnings("unchecked") + EnumSet clone = (EnumSet) super.clone(); + return clone; } catch(CloneNotSupportedException e) { throw new AssertionError(e); } @@ -375,7 +378,7 @@ * Throws an exception if e is not of the correct type for this enum set. */ final void typeCheck(E e) { - Class eClass = e.getClass(); + Class eClass = e.getClass(); if (eClass != elementType && eClass.getSuperclass() != elementType) throw new ClassCastException(eClass + " != " + elementType); } --- old/src/share/classes/java/util/HashMap.java 2012-01-29 19:33:34.000000000 -0800 +++ new/src/share/classes/java/util/HashMap.java 2012-01-29 19:33:34.000000000 -0800 @@ -1,5 +1,5 @@ /* - * 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 @@ -667,7 +667,8 @@ * * @return a shallow copy of this map */ - public Object clone() { + @Override + public HashMap clone() { HashMap result = null; try { result = (HashMap)super.clone(); --- old/src/share/classes/java/util/HashSet.java 2012-01-29 19:33:35.000000000 -0800 +++ new/src/share/classes/java/util/HashSet.java 2012-01-29 19:33:35.000000000 -0800 @@ -1,5 +1,5 @@ /* - * 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 @@ -247,8 +247,10 @@ * * @return a shallow copy of this set */ - public Object clone() { + @Override + public HashSet clone() { try { + @SuppressWarnings("unchecked") HashSet newSet = (HashSet) super.clone(); newSet.map = (HashMap) map.clone(); return newSet; @@ -305,6 +307,7 @@ // Read in all elements in the proper order. for (int i=0; i clone() { try { Hashtable t = (Hashtable) super.clone(); t.table = new Entry[table.length]; --- old/src/share/classes/java/util/IdentityHashMap.java 2012-01-29 19:33:36.000000000 -0800 +++ new/src/share/classes/java/util/IdentityHashMap.java 2012-01-29 19:33:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -696,8 +696,10 @@ * * @return a shallow copy of this map */ - public Object clone() { + @Override + public IdentityHashMap clone() { try { + @SuppressWarnings("unchecked") IdentityHashMap m = (IdentityHashMap) super.clone(); m.entrySet = null; m.table = table.clone(); --- old/src/share/classes/java/util/JumboEnumSet.java 2012-01-29 19:33:37.000000000 -0800 +++ new/src/share/classes/java/util/JumboEnumSet.java 2012-01-29 19:33:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -217,7 +217,7 @@ public boolean remove(Object e) { if (e == null) return false; - Class eClass = e.getClass(); + Class eClass = e.getClass(); if (eClass != elementType && eClass.getSuperclass() != elementType) return false; int eOrdinal = ((Enum)e).ordinal(); --- old/src/share/classes/java/util/LinkedList.java 2012-01-29 19:33:37.000000000 -0800 +++ new/src/share/classes/java/util/LinkedList.java 2012-01-29 19:33:37.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, 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 @@ -1004,7 +1004,8 @@ * * @return a shallow copy of this {@code LinkedList} instance */ - public Object clone() { + @Override + public LinkedList clone() { LinkedList clone = superClone(); // Put clone into "virgin" state --- old/src/share/classes/java/util/RegularEnumSet.java 2012-01-29 19:33:38.000000000 -0800 +++ new/src/share/classes/java/util/RegularEnumSet.java 2012-01-29 19:33:37.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -139,7 +139,7 @@ public boolean contains(Object e) { if (e == null) return false; - Class eClass = e.getClass(); + Class eClass = e.getClass(); if (eClass != elementType && eClass.getSuperclass() != elementType) return false; @@ -173,7 +173,7 @@ public boolean remove(Object e) { if (e == null) return false; - Class eClass = e.getClass(); + Class eClass = e.getClass(); if (eClass != elementType && eClass.getSuperclass() != elementType) return false; --- old/src/share/classes/java/util/TreeMap.java 2012-01-29 19:33:38.000000000 -0800 +++ new/src/share/classes/java/util/TreeMap.java 2012-01-29 19:33:38.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, 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 @@ -617,7 +617,8 @@ * * @return a shallow copy of this map */ - public Object clone() { + @Override + public TreeMap clone() { TreeMap clone = null; try { clone = (TreeMap) super.clone(); --- old/src/share/classes/java/util/TreeSet.java 2012-01-29 19:33:39.000000000 -0800 +++ new/src/share/classes/java/util/TreeSet.java 2012-01-29 19:33:38.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -469,16 +469,17 @@ * * @return a shallow copy of this set */ - public Object clone() { - TreeSet clone = null; + @Override + public TreeSet clone() { try { - clone = (TreeSet) super.clone(); + @SuppressWarnings("unchecked") + TreeSet clone = (TreeSet) super.clone(); + clone.m = new TreeMap<>(m); + return clone; + } catch (CloneNotSupportedException e) { throw new InternalError(e); } - - clone.m = new TreeMap<>(m); - return clone; } /** --- old/src/share/classes/java/util/Vector.java 2012-01-29 19:33:39.000000000 -0800 +++ new/src/share/classes/java/util/Vector.java 2012-01-29 19:33:39.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -664,10 +664,11 @@ * * @return a clone of this vector */ - public synchronized Object clone() { + @Override + public synchronized Vector clone() { try { @SuppressWarnings("unchecked") - Vector v = (Vector) super.clone(); + Vector v = (Vector) super.clone(); v.elementData = Arrays.copyOf(elementData, elementCount); v.modCount = 0; return v; --- old/src/share/classes/javax/naming/directory/BasicAttribute.java 2012-01-29 19:33:40.000000000 -0800 +++ new/src/share/classes/javax/naming/directory/BasicAttribute.java 2012-01-29 19:33:39.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -99,7 +99,7 @@ } catch (CloneNotSupportedException e) { attr = new BasicAttribute(attrID, ordered); } - attr.values = (Vector)values.clone(); + attr.values = values.clone(); return attr; } --- old/src/share/classes/javax/naming/directory/BasicAttributes.java 2012-01-29 19:33:40.000000000 -0800 +++ new/src/share/classes/javax/naming/directory/BasicAttributes.java 2012-01-29 19:33:40.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -147,7 +147,7 @@ } catch (CloneNotSupportedException e) { attrset = new BasicAttributes(ignoreCase); } - attrset.attrs = (Hashtable)attrs.clone(); + attrset.attrs = attrs.clone(); return attrset; } --- old/src/share/classes/javax/naming/spi/DirectoryManager.java 2012-01-29 19:33:40.000000000 -0800 +++ new/src/share/classes/javax/naming/spi/DirectoryManager.java 2012-01-29 19:33:40.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -93,7 +93,7 @@ env = new Hashtable<>(7); } else { // Make a (shallow) copy of the environment. - env = (Hashtable) env.clone(); + env = env.clone(); } env.put(CPE, cpe); --- old/src/share/classes/sun/security/acl/AclEntryImpl.java 2012-01-29 19:33:41.000000000 -0800 +++ new/src/share/classes/sun/security/acl/AclEntryImpl.java 2012-01-29 19:33:41.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -165,7 +165,7 @@ public synchronized Object clone() { AclEntryImpl cloned; cloned = new AclEntryImpl(user); - cloned.permissionSet = (Vector) permissionSet.clone(); + cloned.permissionSet = permissionSet.clone(); cloned.negative = negative; return cloned; } --- old/src/share/classes/sun/security/provider/certpath/ForwardState.java 2012-01-29 19:33:41.000000000 -0800 +++ new/src/share/classes/sun/security/provider/certpath/ForwardState.java 2012-01-29 19:33:41.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -242,8 +242,7 @@ ForwardState clonedState = (ForwardState) super.clone(); /* clone checkers, if cloneable */ - clonedState.forwardCheckers = (ArrayList) - forwardCheckers.clone(); + clonedState.forwardCheckers = forwardCheckers.clone(); ListIterator li = clonedState.forwardCheckers.listIterator(); while (li.hasNext()) { @@ -258,8 +257,7 @@ * deep copy contents, since the elements of the Set * are never modified by subsequent calls to updateState(). */ - clonedState.subjectNamesTraversed - = (HashSet)subjectNamesTraversed.clone(); + clonedState.subjectNamesTraversed = subjectNamesTraversed.clone(); return clonedState; } catch (CloneNotSupportedException e) { throw new InternalError(e.toString(), e); --- old/src/share/classes/sun/security/provider/certpath/ReverseState.java 2012-01-29 19:33:42.000000000 -0800 +++ new/src/share/classes/sun/security/provider/certpath/ReverseState.java 2012-01-29 19:33:42.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -371,8 +371,7 @@ ReverseState clonedState = (ReverseState) super.clone(); /* clone checkers, if cloneable */ - clonedState.userCheckers = - (ArrayList)userCheckers.clone(); + clonedState.userCheckers = userCheckers.clone(); ListIterator li = clonedState.userCheckers.listIterator(); while (li.hasNext()) {