Skip to content

Commit cdd77ec

Browse files
committed
fix(environment): Fix Java 8 detection
1 parent 54112ab commit cdd77ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/environment/src/test/java/datadog/environment/CommandLineTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public static Stream<Arguments> data() {
6060
@MethodSource("data")
6161
public void testGetVmArguments(
6262
String useCase, RunArguments arguments, RunArguments expectedArguments) throws Exception {
63+
if (useCase.contains("argfile")) {
64+
System.out.println(">>> java.home" + System.getProperty("java.home"));
65+
System.err.println(">>> java.home" + System.getProperty("java.home"));
66+
}
6367
// Skip unsupported test cases
6468
skipArgFileTestOnJava8(arguments);
6569
// keepDisabledArgFileOnLinuxOnly(arguments);
@@ -118,7 +122,7 @@ private static void skipArgFileTestOnJava8(RunArguments arguments) {
118122
}
119123
}
120124
if (useArgFile) {
121-
assumeFalse(System.getProperty("java.home").matches(".*[-/]8\\..*"));
125+
assumeFalse(System.getProperty("java.home").matches(".*[-/]8[./].*"));
122126
}
123127
}
124128

0 commit comments

Comments
 (0)