DecimalFormatSymbols provides various setter methods. Most make null checks on the input and throw NPE there. Some setters such as setInfinity(String) do not, and are used in the equals method. Either null safe equality comparisons should be used via Object.equals(), or those setters should throw NPE (but would require behavioral investigation beforehand).
As it was an oversight to not enforce NPE for the setters, we can make an update to the setter methods. This will of course cause a behavioral change, but it is expected to have minimal impact. A CSR will be required.
Additionally, some care should be required, as the currency fields are lazily loaded, and can be null internally.
As it was an oversight to not enforce NPE for the setters, we can make an update to the setter methods. This will of course cause a behavioral change, but it is expected to have minimal impact. A CSR will be required.
Additionally, some care should be required, as the currency fields are lazily loaded, and can be null internally.
- csr for
-
JDK-8341801 DecimalFormatSymbols setters should throw NPE
- Closed
- links to
-
Commit(master) openjdk/jdk/c61d2c5a
-
Review(master) openjdk/jdk/21315