--- 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);