8066642: Fix deprecation warnings in jdk.naming module
Reviewed-by: alanb, chegar
--- 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) {
}
}