RFR: 8303530: Redefine JAXP Configuration File [v15]

Stuart Marks smarks at openjdk.org
Fri Jun 2 19:12:10 UTC 2023


On Wed, 31 May 2023 21:58:44 GMT, Joe Wang <joehw at openjdk.org> wrote:

>> Add a system property, jdk.xml.config.file, to return the path to a custom JAXP configuration file. The current configuration file, jaxp.properties, that the JDK supports will become the default configuration file.
>> 
>> CSR: https://bugs.openjdk.org/browse/JDK-8303531
>> 
>> Tests: XML SQE and JCK tests passed.
>
> Joe Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   adjust javadoc

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java line 562:

> 560:             //invalid setting
> 561:             throw new NumberFormatException("Invalid setting for system property: " + limit.systemProperty());
> 562:         }

Kind of a questionable idiom here to catch NFE and then throw a new NFE, discarding the previous one. Maybe wrap instead? But the larger question is, I think, what should happen in this case. If the user sets a malformed property, will this cause exceptions to be thrown at arbitrary points in the program? Both items are things to consider for later.

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java line 581:

> 579:                 }
> 580:             }
> 581:         }

It's a little hard to see what's going on here but this essentially boils down to a Map<String,String> mapping new names to old names. This or further refactoring should be considered.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/12985#discussion_r1214725620
PR Review Comment: https://git.openjdk.org/jdk/pull/12985#discussion_r1214726907


More information about the core-libs-dev mailing list