RFR of JDK-8233313: server socket created by LocateRegistry.createRegistry(0) can not be closed

Hamlin Li huaming.li at oracle.com
Fri Nov 1 04:47:49 UTC 2019


Would you please to review the following patch?

bug: https://bugs.openjdk.java.net/browse/JDK-8233313

webrev: http://cr.openjdk.java.net/~mli/8233313/webrev.00/

With following code, port used behind is not closed after unexportObject

/Registry registry = LocateRegistry.createRegistry(0);//
//boolean b = UnicastRemoteObject.unexportObject(registry, true);/

But, the port can be closed if pass in an explicit port number to 
createRegistry.

I think is not right and is a resource leak.


Thank you

-Hamlin



More information about the core-libs-dev mailing list