--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java Tue May 03 15:50:54 2016 +0200
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java Tue May 03 10:40:54 2016 -0700
@@ -1645,7 +1645,9 @@
*/
String prefix = GetPropertyAction.privilegedGetProperty("impl.prefix", "");
try {
- impl = Class.forName("java.net." + prefix + implName).newInstance();
+ @SuppressWarnings("deprecation")
+ Object tmp = Class.forName("java.net." + prefix + implName).newInstance();
+ impl = tmp;
} catch (ClassNotFoundException e) {
System.err.println("Class not found: java.net." + prefix +
implName + ":\ncheck impl.prefix property " +
@@ -1662,7 +1664,9 @@
if (impl == null) {
try {
- impl = Class.forName(implName).newInstance();
+ @SuppressWarnings("deprecation")
+ Object tmp = Class.forName(implName).newInstance();
+ impl = tmp;
} catch (Exception e) {
throw new Error("System property impl.prefix incorrect");
}