ppkarwasz opened a new pull request, #104: URL: https://github.com/apache/commons-secure-xml/pull/104
Implements [COMMONSXML-18](https://issues.apache.org/jira/browse/COMMONSXML-18): static helpers that return a secure parser without the factory ceremony. ## New API | Class | Plain | Namespace-aware | |---|---|---| | `SecureDocumentBuilderFactory` | `newDocumentBuilder()` | `newNSDocumentBuilder()` | | `SecureSAXParserFactory` | `newSAXParser()` | `newNSSAXParser()` | | `SecureSAXParserFactory` | `newXMLReader(ContentHandler)` | `newNSXMLReader(ContentHandler)` | - Each helper builds on `newInstance()` / `newNSInstance()`. - The `XMLReader` helpers take the `ContentHandler` to register (open question 2 in the issue); `null` registers none. - The checked `ParserConfigurationException` / `SAXException` cannot occur once the factory is configured, so they are reported as `IllegalStateException` (`SecureException.readerFailed` is generalized to `creationFailed(Class, Throwable)`). - No caching: per the measurements in the issue, the Javadoc and the site overview recommend reusing the returned parser with `reset()` instead. ## Other changes - Version bumped to 1.1.0 (new public API); `commons.release.version` / `commons.release.next` follow, `commons.bc.version` stays at 1.0.0 so japicmp reports against the last release. - The overview examples use the new helpers, including an `XMLReader` example. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
