Code Review 7012768: InetAddress lookupTable leaks/deadlocks when using unsupported name service spi

Chris Hegarty chris.hegarty at oracle.com
Thu Jan 20 07:57:59 PST 2011


On 20/01/2011 14:17, Alan Bateman wrote:
> ....
> The changes to InetAddress look good to me. I see the existing tests for
> this spi are in test/sun/net/InetAddress and maybe the tests should go
> there (I realize it might mean moving some existing tests but the
> benefit is that the tests for this sun.net spi are in one place).

Good point, I think it would be best to keep these tests all together 
and in sun/net.

The name service used in these tests needs to be declared in the service 
provider configuration files, in META-INF/services ( which will be in 
the classpath of the running test ). It is easiest to put each test that 
requires a name service in its own directory where it can store its own 
service configuration files.

We have 3 such tests:
  * sun/net/InetAddress/nameservice (existing) -> 
sun/net/InetAddress/nameservice/simple
  * java/net/InetAddress/B4762344.java -> 
sun/net/InetAddress/nameservice/chaining
  * sun/net/InetAddress/nameservice/deadlock (new for this bug)

Updated Webrev. Moved files are just that, no other changes.
   http://cr.openjdk.java.net/~chegar/7012768/webrev.01/webrev/

-Chris.

>
> -Alan.



More information about the net-dev mailing list