Skip to content

Commit

Permalink
[SUREFIRE-1939] Build fails if java.home has <=2 path components
Browse files Browse the repository at this point in the history
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
  • Loading branch information
michael-o committed Jun 5, 2024
1 parent e166d93 commit 9a43d06
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ public void shouldParseProprietaryReleaseFile() throws IOException {
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";
Expand Down

0 comments on commit 9a43d06

Please sign in to comment.