RFR of JDK-8171133: java/rmi/registry/reexport/Reexport.java, there is a missing case check in createReg(..)
Daniel Fuchs
daniel.fuchs at oracle.com
Thu Dec 15 14:43:36 UTC 2016
Hi Hamlin,
Looks good, but I would suggest to rename the parameter
'remoteOk' into something more natural, like 'shouldFail'.
This should better help to understand the logic in createReg,
which otherwise appears a bit obscure.
No need to regenerate the webrev.
best regards,
-- daniel
On 15/12/16 03:19, Hamlin Li wrote:
> Would you please review the below patch?
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8171133
> webrev: http://cr.openjdk.java.net/~mli/8171133/webrev.00/
>
> java/rmi/registry/reexport/Reexport.java, there is a missing case check
> in createReg(..): if LocateRegistry.createRegistry(port) return null
> when port is in use.
>
> Thank you
> -Hamlin
> ------------------------------------------------------------------------
> diff -r ddd192238fcb test/java/rmi/registry/reexport/Reexport.java
> --- a/test/java/rmi/registry/reexport/Reexport.java Tue Dec 13
> 18:47:23 2016 -0800
> +++ b/test/java/rmi/registry/reexport/Reexport.java Wed Dec 14
> 19:06:40 2016 -0800
> @@ -105,6 +105,9 @@
>
> try {
> reg = LocateRegistry.createRegistry(port);
> + if (remoteOk) {
> + TestLibrary.bomb("Remote registry is up, an Exception
> is expected!");
> + }
> } catch (Throwable e) {
> if (remoteOk) {
> System.err.println("EXPECTING PORT IN USE EXCEPTION:");
>
More information about the core-libs-dev
mailing list