From 74f29c7727c5c42ba0b8fada3e3515d5fd963a5e Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 4 Jun 2021 11:26:46 -0500 Subject: [PATCH] Fix arm architecture translation issue (#809) Found when attempting to build on an `arm64` machine when I recieved an error message below. Root cause is that string equality in java cannot be done with the `==` sign. ``` unknown architecture [arm64] for jdk [provisioned_runtime], must be one of [aarch64, x64] ``` Signed-off-by: Peter Nied --- buildSrc/src/main/java/org/opensearch/gradle/Jdk.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/Jdk.java b/buildSrc/src/main/java/org/opensearch/gradle/Jdk.java index 782cfabcd65..60256dc91dc 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/Jdk.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/Jdk.java @@ -234,7 +234,7 @@ public class Jdk implements Buildable, Iterable { /* * Jdk uses aarch64 from ARM. Translating from arm64 to aarch64 which Jdk understands. */ - return architecture == "arm64" ? "aarch64" : architecture; + return "arm64".equals(architecture) ? "aarch64" : architecture; } }