This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch SUREFIRE-1939
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 9a43d063f755a3fb2e300668f1cd5aac27019205
Author: Michael Osipov <micha...@apache.org>
AuthorDate: Wed Jun 5 14:10:32 2024 +0200

    [SUREFIRE-1939] Build fails if java.home has <=2 path components
    
    Removes an invalid test which passes a JDK or JRE home to a method which
    expects the path to the Java executable. Therefore the invalid input
    leads to an exception.
    
    This closes #743
---
 .../java/org/apache/maven/surefire/booter/SystemUtilsTest.java    | 8 --------
 1 file changed, 8 deletions(-)

diff --git 
a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
 
b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
index 2e7017d0f..6752ba75b 100644
--- 
a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
+++ 
b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
@@ -73,14 +73,6 @@ public class SystemUtilsTest {
             
assertThat(SystemUtils.isJava9AtLeast(path.getAbsolutePath())).isTrue();
         }
 
-        @Test
-        public void incorrectJdkPath() {
-            File jre = new File(System.getProperty("java.home"));
-            File jdk = jre.getParentFile();
-            File incorrect = jdk.getParentFile();
-            
assertThat(SystemUtils.isJava9AtLeast(incorrect.getAbsolutePath())).isFalse();
-        }
-
         @Test
         public void shouldHaveJavaPath() {
             String javaPath = System.getProperty("java.home") + separator + 
"bin" + separator + "java";

Reply via email to