< prev index next >
src/java.base/unix/classes/java/net/DefaultDatagramSocketImplFactory.java
Print this page
*** 59,69 ****
*/
static DatagramSocketImpl createDatagramSocketImpl(boolean isMulticast /*unused on unix*/)
throws SocketException {
if (prefixImplClass != null) {
try {
! return (DatagramSocketImpl)prefixImplClass.newInstance();
} catch (Exception e) {
throw new SocketException("can't instantiate DatagramSocketImpl");
}
} else {
return new java.net.PlainDatagramSocketImpl();
--- 59,71 ----
*/
static DatagramSocketImpl createDatagramSocketImpl(boolean isMulticast /*unused on unix*/)
throws SocketException {
if (prefixImplClass != null) {
try {
! @SuppressWarnings("deprecation")
! DatagramSocketImpl result = (DatagramSocketImpl)prefixImplClass.newInstance();
! return result;
} catch (Exception e) {
throw new SocketException("can't instantiate DatagramSocketImpl");
}
} else {
return new java.net.PlainDatagramSocketImpl();
< prev index next >