Skip to content

Commit 0187f4d

Browse files
author
Vicente Romero
committed
8372023: Javac JMH failures
Reviewed-by: liach
1 parent aa7718d commit 0187f4d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/benchmarks/micros-javac/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
<version>1.0-SNAPSHOT</version>
2929
<name>OpenJDK Microbenchmark of Java Compile</name>
3030
<properties>
31+
<!--
32+
the code below is being compiled with source 25, see JDK-8372023,
33+
if the source version being compiled changes to 26 or 26+, then
34+
some adjustments will be needed at:
35+
test/benchmarks/micros-javac/src/main/java/org/openjdk/bench/langtools/javac/JavacBenchmark.java
36+
-->
3137
<javac.benchmark.openjdk.zip.download.url>https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_windows-x64_bin.zip</javac.benchmark.openjdk.zip.download.url>
3238
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3339
<jmh.version>1.36</jmh.version>

test/benchmarks/micros-javac/src/main/java/org/openjdk/bench/langtools/javac/JavacBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public OutputStream openOutputStream() throws IOException {
188188
};
189189
}
190190
}) {
191-
String[] cmdLine = new String[] {"-XDcompilePolicy=simple", "-implicit:none", "-nowarn", "--module-source-path", root.toString(), "-d", root.toString(), "-XDignore.symbol.file=true", "@" + srcList.toString()};
191+
String[] cmdLine = new String[] {"-source", "25", "-XDcompilePolicy=simple", "-implicit:none", "-nowarn", "--module-source-path", root.toString(), "-d", root.toString(), "-XDignore.symbol.file=true", "@" + srcList.toString()};
192192
if (new Main("javac").compile(cmdLine, ctx).exitCode != 0) {
193193
throw new IOException("compilation failed");
194194
}

0 commit comments

Comments
 (0)