RFR 8022661: InetAddress.writeObject() performs flush() on object output stream
Chris Hegarty
chris.hegarty at oracle.com
Fri Aug 9 02:23:02 PDT 2013
This is a trivial change to remove the unnecessary flush from
InetAddress.writeObject(). The flush can have a negative affect if the
ObjectOutputStream is wrapping an underlying Socket stream.
diff -r 662115496d6b src/share/classes/java/net/InetAddress.java
--- a/src/share/classes/java/net/InetAddress.java Thu Aug 08
17:28:00 2013 +0400
+++ b/src/share/classes/java/net/InetAddress.java Fri Aug 09
10:17:11 2013 +0100
@@ -1601,7 +1601,6 @@ class InetAddress implements java.io.Ser
pf.put("address", holder().getAddress());
pf.put("family", holder().getFamily());
s.writeFields();
- s.flush();
}
}
-Chris.
More information about the net-dev
mailing list