diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d4b516663233..60990f981bc8 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2004-04-22 Michael Koch + + * java/net/Socket.java + (impl): Made package-private. + * java/net/ServerSocket.java + (implAccept): Access Socket.impl field directly. + 2004-04-22 Dalibor Topic * java/util/prefs/Preferences.java, diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java index e2f0314162f7..e507f0b3b099 100644 --- a/libjava/java/net/ServerSocket.java +++ b/libjava/java/net/ServerSocket.java @@ -374,7 +374,8 @@ public class ServerSocket && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); - impl.accept(socket.getImpl()); + impl.accept(socket.impl); + socket.implCreated = true; } /** diff --git a/libjava/java/net/Socket.java b/libjava/java/net/Socket.java index 789e40616620..43c6f3c3d50c 100644 --- a/libjava/java/net/Socket.java +++ b/libjava/java/net/Socket.java @@ -78,13 +78,15 @@ public class Socket /** * The implementation object to which calls are redirected */ - private SocketImpl impl; + // package-private because ServerSocket.implAccept() needs to access it. + SocketImpl impl; /** * True if socket implementation was created by calling their * create() method. */ - private boolean implCreated; + // package-private because ServerSocket.implAccept() needs to access it. + boolean implCreated; /** * True if the socket is bound.