mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Compare strings better
This commit is contained in:
parent
5ffb29d684
commit
075677e415
1 changed files with 1 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue