Skip to content

Commit

Permalink
Ignore JVMJ9VM090I message in java -version output
Browse files Browse the repository at this point in the history
  • Loading branch information
Mesbah-Alam committed Apr 19, 2021
1 parent c1687ef commit aee6990
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ private JavaVersion(boolean isPrimaryJvm, String javaHome) throws StfException {
throw new StfException("Failed to read result of command: " + javaCmd);
}

// Eat superfluous first lines (e.g. JIT: env var TR_OPTIONS etc, or JVMJ9VM082E Unable to switch to IFA processor)
while (javaVersionOutput.startsWith("JVMJ9VM082E") || javaVersionOutput.startsWith("JIT:")) {
// Eat superfluous first lines (e.g. JIT: env var TR_OPTIONS etc, or JVMJ9VM082E Unable to switch to IFA processor,
// or JVMJ9VM090I Slow response to network query)
while (javaVersionOutput.startsWith("JVMJ9VM082E") || javaVersionOutput.startsWith("JIT:")
|| javaVersionOutput.startsWith("JVMJ9VM090I")) {
// Line starts with error message. Remove up to and including the newline.
int endOfFirstLine = javaVersionOutput.indexOf('\n');
javaVersionOutput = javaVersionOutput.substring(endOfFirstLine+1);
Expand Down

0 comments on commit aee6990

Please sign in to comment.