RFR: 8299739: HashedPasswordFileTest.java and ExceptionTest.java can fail with java.lang.NullPointerException
Alex Menkov
amenkov at openjdk.org
Tue Feb 7 01:49:43 UTC 2023
On Fri, 6 Jan 2023 13:11:41 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
> Exceptions during setup of these tests could leave e.g. JMXConnector cs as null.
> But, we call cs.close() during a finally block and fail with an NPE, obscuring the real failure.
> We must only call close if this is not null.
ExceptionTest failure looks strange, but anyway we need the checks to avoid NPE on failures
-------------
Marked as reviewed by amenkov (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11881
More information about the serviceability-dev
mailing list