This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: java.net.ServerSocket
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Tue, 20 Apr 2004 22:33:06 +0200
- Subject: Patch: java.net.ServerSocket
Hi list,
I commited the attached patch to merge java.net.ServerSocket's coding
style with GNU classpath.
Michael
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/ServerSocket.java
Merged coding style from GNU classpath.
Index: java/net/ServerSocket.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/ServerSocket.java,v
retrieving revision 1.38
diff -u -r1.38 ServerSocket.java
--- java/net/ServerSocket.java 20 Apr 2004 13:05:09 -0000 1.38
+++ java/net/ServerSocket.java 20 Apr 2004 20:32:13 -0000
@@ -91,7 +91,7 @@
throw new NullPointerException("impl may not be null");
this.impl = impl;
- this.impl.create (true);
+ this.impl.create(true);
}
/*
@@ -370,11 +370,10 @@
// it is in non-blocking mode, we throw an IllegalBlockingModeException.
// However, in our implementation if the channel itself initiated this
// operation, then we must honor it regardless of its blocking mode.
- if (getChannel() != null
- && !getChannel().isBlocking ()
- && !((PlainSocketImpl) getImpl()).isInChannelOperation())
- throw new IllegalBlockingModeException ();
-
+ if (getChannel() != null && ! getChannel().isBlocking()
+ && ! ((PlainSocketImpl) getImpl()).isInChannelOperation())
+ throw new IllegalBlockingModeException();
+
impl.accept(socket.getImpl());
}
@@ -579,11 +578,9 @@
{
if (! isBound())
return "ServerSocket[unbound]";
-
- return ("ServerSocket[addr=" + getInetAddress()
- + ",port=" + impl.getPort()
- + ",localport=" + impl.getLocalPort()
- + "]");
+
+ return ("ServerSocket[addr=" + getInetAddress() + ",port="
+ + impl.getPort() + ",localport=" + impl.getLocalPort() + "]");
}
/**