desruisseaux commented on code in PR #3392:
URL: https://github.com/apache/maven-surefire/pull/3392#discussion_r3614241667


##########
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java:
##########
@@ -486,6 +487,96 @@ public void shouldJoinStrings() throws Exception {
         assertThat(result).isEmpty();
     }
 
+    @Test
+    public void shouldFindNestedModuleDescriptor() throws Exception {
+        // Create a temp directory structure: 
target/classes/com.example/module-info.class
+        File tempDir = 
Files.createTempDirectory("surefire-test-nested-module").toFile();
+        try {
+            File moduleDir = new File(tempDir, "com.example");

Review Comment:
   The `File` should be before the `try` block (the `File` constructor does not 
actually create the file on the file system), so that `moduleDir.delete()` can 
be invoked directly in the `finally` block.



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