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 05:41:37 UTC 2019
This is found during fixing JDK-8233105
<https://bugs.openjdk.java.net/browse/JDK-8233105>, so please consider
test scenario in JDK-8233105
<https://bugs.openjdk.java.net/browse/JDK-8233105>
On 2019/11/1 12:47 PM, Hamlin Li wrote:
> Would you please to review the following patch?
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8233313,
> https://bugs.openjdk.java.net/browse/JDK-8233105
>
> 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