-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
It possible, but unlikely, that there is existing code that depends on the current broken behavior. No workaround/property to restore old behavior is proposed, it could be considered if issues arise.
-
Java API
-
SE
Summary
The javax.management.MBeanServer method registerMBean is changed to throw RuntimeOperationsException instead of NullPointerException when invoked with a null "object" parameter. The change aligns the implementation with the specification.
Problem
It is common in the javax.management.MBeanServer implementation for methods to check if parameters are null. Nulls are reported by throwing a RuntimeOperationsException, with an IllegalArgumentException as cause.
The registerMBean method incorrectly throws NullPointerException if invoked with a null value for the "object" parameter.
Solution
Change the javax.management.MBeanServer method registerMBean to throw RuntimeOperationsException, with an IllegalArgumentException as the cause, when invoked with a null value for the "object" parameter.
Specification
No API or doc changes.
Github PR for reference: https://github.com/openjdk/jdk/pull/26548
- csr of
-
JDK-8364227 MBeanServer registerMBean throws NPE
-
- Resolved
-