Skip to content

Commit

Permalink
Fix arm architecture translation issue (opensearch-project#809)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
peternied committed Jul 1, 2021
1 parent 26d5792 commit a8c02fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/org/opensearch/gradle/Jdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private String translateJdkArchitecture(String architecture) {
/*
* Jdk uses aarch64 from ARM. Translating from arm64 to aarch64 which Jdk understands.
*/
return architecture == "arm64" ? "aarch64" : architecture;
return "arm64".equals(architecture) ? "aarch64" : architecture;
}

}

0 comments on commit a8c02fc

Please sign in to comment.