Skip to content

Commit edfcd2c

Browse files
committed
work around warning in venv created with --jvm launcher
1 parent 8cc6554 commit edfcd2c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,10 @@ private String[] getExecutableList() {
476476
for (String arg : ManagementFactory.getRuntimeMXBean().getInputArguments()) {
477477
if (arg.matches("(-Xrunjdwp:|-agentlib:jdwp=).*suspend=y.*")) {
478478
arg = arg.replace("suspend=y", "suspend=n");
479-
}
480-
if ((javaOptions != null && javaOptions.contains(arg)) || (javaToolOptions != null && javaToolOptions.contains(arg))) {
479+
} else if (arg.matches(".*ThreadPriorityPolicy.*")) {
480+
// skip this one, it may cause warnings
481+
continue;
482+
} else if ((javaOptions != null && javaOptions.contains(arg)) || (javaToolOptions != null && javaToolOptions.contains(arg))) {
481483
// both _JAVA_OPTIONS and JAVA_TOOL_OPTIONS are adeed during
482484
// JVM startup automatically. We do not want to repeat these
483485
// for subprocesses, because they should also pick up those

0 commit comments

Comments
 (0)