--- old/src/share/classes/javax/naming/spi/NamingManager.java 2011-07-27 17:28:32.919004600 -0700 +++ new/src/share/classes/javax/naming/spi/NamingManager.java 2011-07-27 17:28:32.263939100 -0700 @@ -139,7 +139,7 @@ throws IllegalAccessException, InstantiationException, MalformedURLException { - Class clas = null; + Class clas = null; // Try to use current class loader try { @@ -172,7 +172,7 @@ * @return factory created; null if cannot create */ private static Object createObjectFromFactories(Object obj, Name name, - Context nameCtx, Hashtable environment) throws Exception { + Context nameCtx, Hashtable environment) throws Exception { FactoryEnumeration factories = ResourceManager.getFactories( Context.OBJECT_FACTORIES, environment, nameCtx); @@ -349,7 +349,7 @@ * invoking a factory. */ static Object processURLAddrs(Reference ref, Name name, Context nameCtx, - Hashtable environment) + Hashtable environment) throws NamingException { for (int i = 0; i < ref.size(); i++) { @@ -368,7 +368,7 @@ } private static Object processURL(Object refInfo, Name name, - Context nameCtx, Hashtable environment) + Context nameCtx, Hashtable environment) throws NamingException { Object answer; @@ -427,7 +427,7 @@ * @see #getObjectInstance */ static Context getContext(Object obj, Name name, Context nameCtx, - Hashtable environment) throws NamingException { + Hashtable environment) throws NamingException { Object answer; if (obj instanceof Context) { @@ -452,7 +452,7 @@ // Used by ContinuationContext static Resolver getResolver(Object obj, Name name, Context nameCtx, - Hashtable environment) throws NamingException { + Hashtable environment) throws NamingException { Object answer; if (obj instanceof Resolver) { @@ -585,7 +585,7 @@ */ private static Object getURLObject(String scheme, Object urlInfo, Name name, Context nameCtx, - Hashtable environment) + Hashtable environment) throws NamingException { // e.g. "ftpURLContextFactory" @@ -771,15 +771,16 @@ * @return A non-null Context object for continuing the operation. * @exception NamingException If a naming exception occurred. */ + @SuppressWarnings("unchecked") public static Context getContinuationContext(CannotProceedException cpe) throws NamingException { - Hashtable env = cpe.getEnvironment(); + Hashtable env = (Hashtable)cpe.getEnvironment(); if (env == null) { - env = new Hashtable(7); + env = new Hashtable<>(7); } else { // Make a (shallow) copy of the environment. - env = (Hashtable) env.clone(); + env = (Hashtable)env.clone(); } env.put(CPE, cpe);