RFR of JDK-8171133: java/rmi/registry/reexport/Reexport.java, there is a missing case check in createReg(..)
Roger Riggs
Roger.Riggs at Oracle.com
Thu Dec 15 14:45:20 UTC 2016
Hi Hamlin,
If this is supposed to fix the call from line 68: then doesn't the test
for reg != null
at line 70 already have the same effect?
Roger
On 12/14/2016 10:19 PM, 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