8066642: Fix deprecation warnings in jdk.naming module
authorprappo
Wed, 17 Dec 2014 13:03:29 +0000
changeset 28114 7ab051865dd2
parent 28113 ef63e17cd3ce
child 28115 3931c251d78f
8066642: Fix deprecation warnings in jdk.naming module Reviewed-by: alanb, chegar
jdk/src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java
--- a/jdk/src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java	Wed Dec 17 00:19:28 2014 +0000
+++ b/jdk/src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java	Wed Dec 17 13:03:29 2014 +0000
@@ -353,7 +353,6 @@
     /**
      * Wrap a RemoteException inside a NamingException.
      */
-    @SuppressWarnings("deprecation")
     public static NamingException wrapRemoteException(RemoteException re) {
 
         NamingException ne;
@@ -365,8 +364,7 @@
             ne = new NoPermissionException();
 
         } else if (re instanceof StubNotFoundException ||
-                   re instanceof UnknownHostException ||
-                   re instanceof SocketSecurityException) {
+                   re instanceof UnknownHostException) {
             ne = new ConfigurationException();
 
         } else if (re instanceof ExportException ||
@@ -414,11 +412,10 @@
      * Attempts to install a security manager if none is currently in
      * place.
      */
-    @SuppressWarnings("deprecation")
     private static void installSecurityMgr() {
 
         try {
-            System.setSecurityManager(new RMISecurityManager());
+            System.setSecurityManager(new SecurityManager());
         } catch (Exception e) {
         }
     }