On Wed, 18 Nov 2026 00:19:02 GMT, Joe Wang <[email protected]> wrote:
>> Reject invalid values with an IllegalArgumentException for properties that >> accept a fixed set of values. >> >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > fix title mismatch src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java line 936: > 934: * @return the mapped integer, or the configured integer > representation > 935: * for unmapped values > 936: * @throws IllegalArgumentException if the value is not in the > provided map Should the `IAE` clause mention that it is thrown when the value is not in the map **AND** there is no fallback value provided? src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java line 945: > 943: Integer iVal; > 944: if (map != null) { > 945: String stringValue = ((String)value).trim(); The overall purpose of this change is to enforce stricter behavior while trimming white space seems to make the validation more lenient. I personally think it is okay if not trimmed, because invalid values fail, so excess white space values would be clear that they need to be corrected. It isn't a big deal and I'll defer to your preference. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33938#discussion_r4622746719 PR Review Comment: https://git.openjdk.org/jdk/pull/33938#discussion_r4622629103
