8155963: Fix deprecation warning in windows java.net implementation
Reviewed-by: prr
--- a/jdk/src/java.base/windows/classes/java/net/DefaultDatagramSocketImplFactory.java Tue May 03 10:40:54 2016 -0700
+++ b/jdk/src/java.base/windows/classes/java/net/DefaultDatagramSocketImplFactory.java Tue May 03 12:18:50 2016 -0700
@@ -90,7 +90,9 @@
throws SocketException {
if (prefixImplClass != null) {
try {
- return (DatagramSocketImpl) prefixImplClass.newInstance();
+ @SuppressWarnings("deprecation")
+ Object result = prefixImplClass.newInstance();
+ return (DatagramSocketImpl) result;
} catch (Exception e) {
throw new SocketException("can't instantiate DatagramSocketImpl");
}