You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/11/12 18:48:13 UTC

[GitHub] [commons-email] garydgregory commented on a diff in pull request #109: JUnit5 assertThrows DataSourceCompositeResolverTest

garydgregory commented on code in PR #109:
URL: https://github.com/apache/commons-email/pull/109#discussion_r1020793349


##########
src/test/java/org/apache/commons/mail/resolver/DataSourceCompositeResolverTest.java:
##########
@@ -58,12 +60,13 @@ public void testResolvingFilesLenient() throws Exception
         assertTrue(toByteArray(dataSourceResolver.resolve("/contentTypeTest.gif")).length > 0);
     }
 
-    @Test(expected = IOException.class)
-    public void testResolvingFilesNonLenient() throws Exception
+    @Test
+    public void testResolvingFilesNonLenient()
     {
         final DataSourceResolver dataSourceResolver = new DataSourceCompositeResolver(dataSourceResolversMissing, false);
 
-        dataSourceResolver.resolve("./image/does-not-exist.gif");
+        final Executable testMethod = () -> dataSourceResolver.resolve("./image/does-not-exist.gif");

Review Comment:
   Hello @nhojpatrick 
   Thank you for your PR.
   As with the other PRs, the local variable is superfluous. 
   Please rebase on master to fix the spotbugs build on Java 11 and 17.



-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org