Skip to content

Commit 2d308e1

Browse files
committed
Fix three minor build and CI issues
- Use --release 17 instead of -source 17 -target 17 in javacOptions; --release also restricts the API set to JDK 17, catching accidental use of newer APIs at compile time - Remove --add-opens from @fork jvmArgsAppend in benchmark classes; build.sbt's Jmh/javaOptions already passes them to the forked JVM - Add missing trailing newline to CI.yml
1 parent d9b0dc4 commit 2d308e1

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ jobs:
7878
./sbt msgpack-core/test msgpack-jackson/test -J-Dmsgpack.universal-buffer=true
7979
else
8080
./sbt test -J-Dmsgpack.universal-buffer=true
81-
fi
81+
fi

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ lazy val msgpackJackson3 = Project(id = "msgpack-jackson3", base = file("msgpack
190190
OsgiKeys.exportPackage := Seq("org.msgpack.jackson", "org.msgpack.jackson.dataformat"),
191191
OsgiKeys.importPackage := Seq("!android.os", "!sun.*"),
192192
Test / fork := true,
193-
javacOptions := Seq("-source", "17", "-target", "17"),
194-
doc / javacOptions := Seq("-source", "17", "-Xdoclint:none"),
193+
javacOptions := Seq("--release", "17"),
194+
doc / javacOptions := Seq("--release", "17", "-Xdoclint:none"),
195195
libraryDependencies ++=
196196
Seq(
197197
"tools.jackson.core" % "jackson-databind" % "3.1.2",

msgpack-jackson3/src/jmh/java/org/msgpack/jackson/dataformat/benchmark/MsgpackReadBenchmark.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
@BenchmarkMode(Mode.Throughput)
1717
@OutputTimeUnit(TimeUnit.SECONDS)
1818
@State(Scope.Thread)
19-
@Fork(value = 2, jvmArgsAppend = {
20-
"--add-opens=java.base/java.nio=ALL-UNNAMED",
21-
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
22-
})
19+
@Fork(2)
2320
@Warmup(iterations = 5, time = 1)
2421
@Measurement(iterations = 5, time = 1)
2522
public class MsgpackReadBenchmark

msgpack-jackson3/src/jmh/java/org/msgpack/jackson/dataformat/benchmark/MsgpackWriteBenchmark.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
@BenchmarkMode(Mode.Throughput)
1818
@OutputTimeUnit(TimeUnit.SECONDS)
1919
@State(Scope.Thread)
20-
@Fork(value = 2, jvmArgsAppend = {
21-
"--add-opens=java.base/java.nio=ALL-UNNAMED",
22-
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
23-
})
20+
@Fork(2)
2421
@Warmup(iterations = 5, time = 1)
2522
@Measurement(iterations = 5, time = 1)
2623
public class MsgpackWriteBenchmark

0 commit comments

Comments
 (0)