Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ public InputSource getExternalSubset(final String name, final String baseURI) th
* @param publicId The public identifier, or {@code null} if none.
* @param baseURI The base URI for relative resolution, or {@code null}.
* @param systemId The system identifier of the unresolved entity.
* @return An empty {@link InputSource} carrying the requested identifiers.
* @return an empty {@link InputSource} carrying the requested identifiers.
* @throws SAXException when {@value SecureException#THROW_ON_UNRESOLVED} is set: unresolved references are rejected instead of resolved to empty.
* @throws IOException never by the default implementation.
*/
private InputSource onUnresolved(final String name, final String publicId, final String baseURI, final String systemId) throws SAXException, IOException {
private InputSource onUnresolved(final String name, final String publicId, final String baseURI, final String systemId) throws SAXException {
if (SecureException.throwOnUnresolved()) {
throw new SAXException(SecureException.forbidden(name, null, publicId, systemId, baseURI));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void setFeature(final String name, final boolean value) throws Transforme
}
}

private static void associatedStylesheet(final SAXTransformerFactory factory, final Source source) throws Exception {
private static void associatedStylesheet(final SAXTransformerFactory factory, final Source source) {
try {
factory.getAssociatedStylesheet(source, null, null, null);
} catch (final TransformerConfigurationException | NullPointerException expected) {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/apache/commons/xml/secure/XIncludeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void secureDomBlocksParseText() throws Exception {

@Test
@Tag("dom")
void secureDomBlocksParseXml() throws Exception {
void secureDomBlocksParseXml() {
final InputSource input = inputSource(xiIncludeXml(REFERENCED_XML, "xml"));

final DocumentBuilderFactory factory = SecureDocumentBuilderFactory.newInstance();
Expand Down Expand Up @@ -306,7 +306,7 @@ void secureSaxBlocksParseText() throws Exception {

@Test
@Tag("sax")
void secureSaxBlocksParseXml() throws Exception {
void secureSaxBlocksParseXml() {
final InputSource input = inputSource(xiIncludeXml(REFERENCED_XML, "xml"));

final SAXParserFactory factory = SecureSAXParserFactory.newInstance();
Expand Down
Loading