Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b10
Description
These two tests fail occasionally:
test/jdk/javax/management/security/HashedPasswordFileTest.java
test/jdk/javax/management/MBeanServer/ExceptionTest.java
e.g an NPE in HashedPasswordFileTest at line 220: cs.stop()
Stopping the JMXConnectorServer, but cs is null.
testClearTextPasswordFile and other tests call createServerSide() which would set cs from a call to newJMConnectorServer().
cs is a private variable and is never set to null, so the first test is testClearTextPasswordFile and it fails to set it.
The other tests then go on to pass.
createServerSide() must have thrown an exception, to avoid setting cs, but no exception is visible in the log.
Ah, testClearTextPasswordFile must call createServerSide and get an exception, but it calls cs.stop() in a finally block, so hits the NPE before we see the exception.
Test needs an update to not hit an NPE before showing its Exception.