Raise totalEntitySizeLimit for dictionary XML parsing#3
Merged
Conversation
html.xml's shared attribute-group entities (event handlers, core/lang attributes) are &entity;-referenced 335 times across ~90 tag definitions, which legitimately accumulates past newer JDKs' tightened default for jdk.xml.totalEntitySizeLimit (confirmed failing on JDK 25, fine on JDK 21). Set it explicitly on this parser instance only, so other XML parsing in a consuming application is unaffected. Fixes #2
garethedwards-tass
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
SyntaxDictionary.loadDictionary()throwsSAXParseException (JAXP00010004)on JDK 25, becausehtml.xml's shared attribute-group entities (event handlers, core/lang attributes) are&entity;-referenced 335 times across ~90 tag definitions, and the accumulated expansion crosses JDK 25's tightened default forjdk.xml.totalEntitySizeLimit. JDK 21 doesn't hit this.XMLReaderinstance (http://www.oracle.com/xml/jaxp/properties/totalEntitySizeLimit), so no other XML parsing in a consuming application is affected.Test plan
JAXP00010004failure in isolation with a small synthetic DTD (repeated small entity, same shape ashtml.xml's pattern) on JDK 25, confirmed it disappears with the property set and the parser instance without it still fails as before (proving the fix is scoped, not a JVM-wide change).