From 075677e415f215b63267269f681617299542d864 Mon Sep 17 00:00:00 2001 From: deannagarcia <69992229+deannagarcia@users.noreply.github.com> Date: Fri, 24 Feb 2023 14:53:36 -0800 Subject: [PATCH] Compare strings better --- java/internal/JavaVersionTest.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/java/internal/JavaVersionTest.java b/java/internal/JavaVersionTest.java index 320ca3d892..4ee6e97e12 100644 --- a/java/internal/JavaVersionTest.java +++ b/java/internal/JavaVersionTest.java @@ -41,12 +41,7 @@ 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") { - System.out.println("The version was 8"); - exp = "1.8"; - } else { - System.out.println("The version was not 8, it was: " + exp); - } + if(exp.equals("8")) exp = "1.8"; if(exp == null || exp.isEmpty()) { System.err.println("No kokoro java version found, skipping check"); return;