garydgregory commented on code in PR #292:
URL: https://github.com/apache/commons-digester/pull/292#discussion_r4442933102


##########
commons-digester3-core/src/test/java/org/apache/commons/digester3/xmlrules/FromXmlRuleSetTest.java:
##########
@@ -176,11 +176,8 @@ void testFactoryIgnoreCreateRule()
         final URL rules = getClass().getResource( "testfactoryignore.xml" );
 
         final String xml = "<?xml version='1.0' ?><root one='good' two='bad' 
three='ugly'><foo/></root>";
-        try {
-            newLoader(createRules(rules)).newDigester().parse(new 
StringReader(xml));
-        } catch (final Exception e) {
-            fail("This exception should have been ignored: " + 
e.getClass().getName());
-        }
+        assertDoesNotThrow( () -> newLoader( createRules( rules ) 
).newDigester().parse( new StringReader( xml ) ),

Review Comment:
   Don't use assertDoesNotThrow, it's just clutter IMO. Why would you even do 
that on the last and only assert in a test?



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