Debug java version test

This commit is contained in:
deannagarcia 2023-02-24 14:44:31 -08:00 committed by GitHub
parent 27c7319106
commit 5ffb29d684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,12 @@ public class JavaVersionTest {
public void testJavaVersion() throws Exception {
String exp = System.getenv("KOKORO_JAVA_VERSION");
// Java 8's version is read as "1.8"
if(exp == "8") exp = "1.8";
if(exp == "8") {
System.out.println("The version was 8");
exp = "1.8";
} else {
System.out.println("The version was not 8, it was: " + exp);
}
if(exp == null || exp.isEmpty()) {
System.err.println("No kokoro java version found, skipping check");
return;