-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parameter to set max entities #555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're setting the limit globally which affects all subsequently instantiated XMLReader
s. It's probably better to limit the effects to the current XmlDecoder
instance by using the XML API instead (untested):
private static final String TOTAL_ENTITY_SIZE_LIMIT = "http://www.oracle.com/xml/jaxp/properties/totalEntitySizeLimit"
public XmlDecoder(final String totalEntitySizeLimit) {
// ...
saxReader.setProperty(TOTAL_ENTITY_SIZE_LIMIT, totalEntitySizeLimit);
}
This has lesser implications. Also, some more declarations can be made "final". Thx @blackwinter.
This brings the comment of how to set the variable to allow unlimited entities into flux-commands.md.
Usage of XML API is definitley an improvement here - thx ! Updated in ee17957. |
metafacture-xml/src/main/java/org/metafacture/xml/XmlDecoder.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jens Wille <[email protected]>
Thx for the suggestion! |
Resolves #554.