8066642: Fix deprecation warnings in jdk.naming module

Reviewed-by: alanb, chegar
This commit is contained in:
Pavel Rappo 2014-12-17 13:03:29 +00:00
parent 66ed69c8ba
commit 024e2c06d7

@ -353,7 +353,6 @@ public class RegistryContext implements Context, Referenceable {
/**
* Wrap a RemoteException inside a NamingException.
*/
@SuppressWarnings("deprecation")
public static NamingException wrapRemoteException(RemoteException re) {
NamingException ne;
@ -365,8 +364,7 @@ public class RegistryContext implements Context, Referenceable {
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 @@ public class RegistryContext implements Context, Referenceable {
* 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) {
}
}