RFR 8008223: java/net/BindException/Test.java fails rarely
Chris Hegarty
chris.hegarty at oracle.com
Fri Feb 15 01:51:47 PST 2013
On 15/02/2013 08:18, Alan Bateman wrote:
> ....
> I guess this is assuming that their the tests are run with -ea or that
> the presence of the assert will keep the reference alive. Would it be
The presence of the asserts will keep the reference alive even if
running without asserts enabled. But it is not ideal.
> better to just have a finally block that closes the sockets (from a
> brief look it doesn't appear that this test cleans up anyway).
Right. This is much cleaner.
http://cr.openjdk.java.net/~chegar/8008223/webrev.01/webrev/
-Chris.
More information about the net-dev
mailing list