--- a/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java Fri Oct 18 17:08:59 2019 +0100
+++ b/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java Fri Oct 18 21:25:01 2019 +0100
@@ -46,7 +46,9 @@
* @author Pavani Diwanji
*/
-abstract class AbstractPlainDatagramSocketImpl extends PlatformDatagramSocketImpl
+abstract class AbstractPlainDatagramSocketImpl
+ extends DatagramSocketImpl
+ implements PlatformDatagramSocketImpl
{
/* timeout value for receive() */
int timeout;
--- a/src/java.base/share/classes/sun/net/PlatformDatagramSocketImpl.java Fri Oct 18 17:08:59 2019 +0100
+++ b/src/java.base/share/classes/sun/net/PlatformDatagramSocketImpl.java Fri Oct 18 21:25:01 2019 +0100
@@ -25,8 +25,8 @@
package sun.net;
-import java.net.DatagramSocketImpl;
+public interface PlatformDatagramSocketImpl {
-public abstract class PlatformDatagramSocketImpl extends DatagramSocketImpl {
- public abstract boolean nativeConnectDisabled();
+ /** Tells whether, or not, the native connect should be used. */
+ boolean nativeConnectDisabled();
}
--- a/src/java.base/share/classes/sun/nio/ch/NioDatagramSocketImpl.java Fri Oct 18 17:08:59 2019 +0100
+++ b/src/java.base/share/classes/sun/nio/ch/NioDatagramSocketImpl.java Fri Oct 18 21:25:01 2019 +0100
@@ -31,6 +31,7 @@
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.net.DatagramPacket;
+import java.net.DatagramSocketImpl;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.NetworkInterface;
@@ -63,7 +64,10 @@
/**
* A DatagramSocketImpl based on low-level NIO primitives.
*/
-public class NioDatagramSocketImpl extends PlatformDatagramSocketImpl {
+public class NioDatagramSocketImpl
+ extends DatagramSocketImpl
+ implements PlatformDatagramSocketImpl
+{
private static final NativeDispatcher nd = new SocketDispatcher();