changeset 11154:fd36dd2f98a9

8066642: Fix deprecation warnings in jdk.naming module Reviewed-by: alanb, chegar
author prappo
date Wed, 17 Dec 2014 13:03:29 +0000
parents f4b60ce96e83
children ab9c56c997e3
files src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java	Wed Dec 17 00:19:28 2014 +0000
+++ b/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) {
         }
     }