8353232: Standardizing and Unifying XML Component Configurations #25102
+463
−264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a refactor patch, no change in functionality.
This patch refactor the configuration code. Rather than for each factory to go through the whole configuration process, a base configuration as represented in JdkXmlConfig is created once, which includes loading of the JAXP Configuration file, factories then get their own copies of the property managers, created on top of the base ones rather than directly constructed.
The JDKCatalog and its Resolver are lazily initialized when external references are encountered. This code replaces the original code block within the security manager. This change also addresses JDK-8350189.
The rest of changes basically replace all direct constructions of XMLSecurityManager/XMLSecurityPropertyManager with calls to JdkXmlConfig's corresponding get methods, which return clones of the base instances. in the factory classes, these clones are updated with property settings on the factories. In non-public or legacy code paths (inherited from upstream components), such updates may not be necessary.
Tests: existing tests T1-3 passed; XML JCK tests passed.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25102/head:pull/25102
$ git checkout pull/25102
Update a local copy of the PR:
$ git checkout pull/25102
$ git pull https://git.openjdk.org/jdk.git pull/25102/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25102
View PR using the GUI difftool:
$ git pr show -t 25102
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25102.diff
Using Webrev
Link to Webrev Comment