Skip to content

Conversation

@keynmol
Copy link
Contributor

@keynmol keynmol commented Aug 16, 2023

We're using this java file:

public class PrintJavaVersion {
  public static void main(String[] args) {
    System.out.print(System.getProperty("java.version"));
  }
}

compiled with java 8 and converted to base64, so that we can reliably print java version regardless whether we run JDK or JRE.

Test plan

  • Existing tests pass

@keynmol keynmol marked this pull request as ready for review August 16, 2023 06:18
Comment on lines +93 to +107
printJavaVersionPath.synchronized {
printJavaVersionPath match {

case Some(value)
if value.resolve("PrintJavaVersion.class").toFile.isFile =>
value
case _ =>
val created = create
printJavaVersionPath = Some(created)
created

}
}

}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably unnecessarily defensive, but disappearing temp files are not unheard of.

@keynmol keynmol requested a review from olafurpg August 16, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants