From 9fd6479043b30a8abb901d481d0f6422f0af4fda Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Thu, 18 Sep 2003 11:32:46 +0000 Subject: 2003-09-18 Michael Koch * java/net/DatagramSocket.java (ch): Removed. (receive): Use getChannel() instead of ch. (send): Likewise. (getChannel): Return null. * java/net/ServerSocket.java (ch): Removed. (setChannel): Removed. (implAccept): Use getChannel() instead of ch. (close): Likewise. (getChannel): Return null. * java/net/Socket.java (ch): Removed. (connect): Use getChannel() instead of ch. (setChannel): Removed. (getChannel): Return null. From-SVN: r71516 --- libjava/java/net/DatagramSocket.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'libjava/java/net/DatagramSocket.java') diff --git a/libjava/java/net/DatagramSocket.java b/libjava/java/net/DatagramSocket.java index 401bcb82697..4cc8e50f0d5 100644 --- a/libjava/java/net/DatagramSocket.java +++ b/libjava/java/net/DatagramSocket.java @@ -74,12 +74,6 @@ public class DatagramSocket */ DatagramSocketImpl impl; - /** - * The unique DatagramChannel object associated with this datagram socket, - * or null. - */ - DatagramChannel ch; - /** * This is the address we are "connected" to */ @@ -519,7 +513,8 @@ public class DatagramSocket throw new IOException ( "Socket connected to a multicast address my not receive"); - if (ch != null && !ch.isBlocking ()) + if (getChannel() != null + && !getChannel().isBlocking ()) throw new IllegalBlockingModeException (); impl.receive(p); @@ -568,7 +563,8 @@ public class DatagramSocket // FIXME: if this is a subclass of MulticastSocket, // use getTimeToLive for TTL val. - if (ch != null && !ch.isBlocking ()) + if (getChannel() != null + && !getChannel().isBlocking ()) throw new IllegalBlockingModeException (); impl.send(p); @@ -618,7 +614,7 @@ public class DatagramSocket */ public DatagramChannel getChannel() { - return ch; + return null; } /** -- cgit v1.2.3