8129499: Structure of java/rmi/activation/rmidViaInheritedChannel tests masks exception
Summary: Check for rmid == null before dereferencing the variable.
Reviewed-by: rriggs, chegar
--- a/jdk/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java Sat Jun 20 10:03:42 2015 -0400
+++ b/jdk/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java Mon Jun 22 13:30:21 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -126,7 +126,9 @@
if (obj != null) {
UnicastRemoteObject.unexportObject(obj, true);
}
- rmid.cleanup();
+ if (rmid != null) {
+ rmid.cleanup();
+ }
}
}
--- a/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java Sat Jun 20 10:03:42 2015 -0400
+++ b/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java Mon Jun 22 13:30:21 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -125,7 +125,9 @@
if (obj != null) {
UnicastRemoteObject.unexportObject(obj, true);
}
- rmid.cleanup();
+ if (rmid != null) {
+ rmid.cleanup();
+ }
}
}