src/share/classes/javax/naming/ldap/InitialLdapContext.java

Print this page

        

*** 127,145 **** * @throws NamingException if a naming exception is encountered * * @see #reconnect * @see LdapContext#reconnect */ public InitialLdapContext(Hashtable<?,?> environment, Control[] connCtls) throws NamingException { super(true); // don't initialize yet // Clone environment since caller owns it. ! Hashtable env = (environment == null) ! ? new Hashtable(11) ! : (Hashtable)environment.clone(); // Put connect controls into environment. Copy them first since // caller owns the array. if (connCtls != null) { Control[] copy = new Control[connCtls.length]; --- 127,146 ---- * @throws NamingException if a naming exception is encountered * * @see #reconnect * @see LdapContext#reconnect */ + @SuppressWarnings("unchecked") public InitialLdapContext(Hashtable<?,?> environment, Control[] connCtls) throws NamingException { super(true); // don't initialize yet // Clone environment since caller owns it. ! Hashtable<Object,Object> env = (environment == null) ! ? new Hashtable<>(11) ! : (Hashtable<Object,Object>)environment.clone(); // Put connect controls into environment. Copy them first since // caller owns the array. if (connCtls != null) { Control[] copy = new Control[connCtls.length];