ppkarwasz commented on code in PR #42:
URL: https://github.com/apache/commons-xml/pull/42#discussion_r3856959939


##########
src/test/java/org/apache/commons/xml/EntityResolverFloorTest.java:
##########
@@ -304,6 +304,18 @@ private static LSInput lsInput(final String systemId) {
         }
     }
 
+    /** An {@link LSInput} naming the resource but carrying no content, the 
shape that would send the implementation into a default-resolution self-fetch. 
*/
+    private static LSInput identifierOnlyLsInput(final String systemId) {
+        try {
+            final DOMImplementationLS ls = (DOMImplementationLS) 
DOMImplementationRegistry.newInstance().getDOMImplementation("LS");
+            final LSInput input = ls.createLSInput();
+            input.setSystemId(systemId);
+            return input;
+        } catch (final Exception e) {
+            throw new IllegalStateException("Failed to build LSInput for " + 
systemId, e);

Review Comment:
   I replaced this with `doesNotThrow`: 
https://github.com/apache/commons-xml/pull/42/commits/c3b61d2b471e51c2817550f8cd9adfa4da167c8e



-- 
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]

Reply via email to