Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ allprojects {
tasks.withType(Test) {
// Add Exports to enable tests to run in JDK17
jvmArgs = [
"-Djruby.compile.invokedynamic=true",
"-Dlog4j2.isThreadContextMapInheritable=true",
"--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
Expand Down
6 changes: 0 additions & 6 deletions config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
# use our provided JNA always versus the system one
#-Djna.nosys=true

# Turn on JRuby invokedynamic
-Djruby.compile.invokedynamic=true

## heap dumps

# generate a heap dump when an allocation from the Java heap fails
Expand All @@ -60,9 +57,6 @@
# Entropy source for randomness
-Djava.security.egd=file:/dev/urandom

# Copy the logging context from parent threads to children
-Dlog4j2.isThreadContextMapInheritable=true

# FasterXML/jackson defaults
#
# Sets the maximum string length (in chars or bytes, depending on input context).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public class JvmOptionsParser {

private static final String[] MANDATORY_JVM_OPTIONS = new String[]{
"-Djruby.regexp.interruptible=true",
"-Djruby.compile.invokedynamic=true",
"-Djdk.io.File.enableADS=true",
"-Dlog4j2.isThreadContextMapInheritable=true",
"16-:--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"16-:--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"16-:--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public void testAlwaysMandatoryJvmPresent() {
JvmOptionsParser.getMandatoryJvmOptions(11).contains("-Djruby.regexp.interruptible=true"));
assertTrue("Contains regexp interruptible for Java 17",
JvmOptionsParser.getMandatoryJvmOptions(17).contains("-Djruby.regexp.interruptible=true"));
assertTrue("Contains compile invokedynamic for Java 17",
JvmOptionsParser.getMandatoryJvmOptions(17).contains("-Djruby.compile.invokedynamic=true"));
assertTrue("Contains log4j2 isThreadContextMapInheritable for Java 17",
JvmOptionsParser.getMandatoryJvmOptions(17).contains("-Dlog4j2.isThreadContextMapInheritable=true"));

}

Expand Down