Skip to content

Commit 3ad6081

Browse files
committed
More consistent use of 'normalizeOs' and 'normalizeArch'
1 parent d968b2d commit 3ad6081

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/gradlex/javamodule/packaging/internal/HostIdentification.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public static void validateHostSystem(String arch, String os) {
1515
String hostOs = hostOs();
1616
String hostArch = hostArch();
1717

18-
if (!normalizeOs(hostOs).equals(normalizeOs(os))) {
18+
if (!hostOs.equals(normalizeOs(os))) {
1919
wrongHostSystemError(hostOs, os);
2020
}
21-
if (!normalizeArch(hostArch).equals(normalizeArch(arch))) {
21+
if (!hostArch.equals(normalizeArch(arch))) {
2222
wrongHostSystemError(hostArch, arch);
2323
}
2424
}
@@ -34,15 +34,15 @@ public static boolean isHostTarget(Target target) {
3434
return target.getOperatingSystem().isPresent()
3535
&& target.getArchitecture().isPresent()
3636
&& target.getOperatingSystem().get().equals(hostOs())
37-
&& target.getArchitecture().get().equals(normalizeArch(hostArch()));
37+
&& target.getArchitecture().get().equals(hostArch());
3838
}
3939

4040
private static String hostOs() {
4141
return normalizeOs(System.getProperty("os.name"));
4242
}
4343

4444
private static String hostArch() {
45-
return System.getProperty("os.arch");
45+
return normalizeArch(System.getProperty("os.arch"));
4646
}
4747

4848
private static String normalizeOs(String name) {

0 commit comments

Comments
 (0)