File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
helpers/jdk/jpackage/test Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 6161import java .util .stream .Collectors ;
6262import static java .util .stream .Collectors .toSet ;
6363import java .util .stream .Stream ;
64+ import jdk .internal .util .OperatingSystem ;
6465import jdk .jpackage .test .Functional .ExceptionBox ;
6566import jdk .jpackage .test .Functional .ThrowingConsumer ;
6667import jdk .jpackage .test .Functional .ThrowingRunnable ;
6768import jdk .jpackage .test .Functional .ThrowingSupplier ;
6869
6970public final class TKit {
7071
71- private static final String OS = System .getProperty ("os.name" ).toLowerCase ();
72-
7372 public static final Path TEST_SRC_ROOT = Functional .identity (() -> {
7473 Path root = Path .of (System .getProperty ("test.src" ));
7574
@@ -176,15 +175,15 @@ static String getCurrentDefaultAppName() {
176175 }
177176
178177 public static boolean isWindows () {
179- return ( OS . contains ( "win" ) );
178+ return OperatingSystem . isWindows ( );
180179 }
181180
182181 public static boolean isOSX () {
183- return ( OS . contains ( "mac" ) );
182+ return OperatingSystem . isMacOS ( );
184183 }
185184
186185 public static boolean isLinux () {
187- return (( OS . contains ( "nix" ) || OS . contains ( "nux" )) );
186+ return OperatingSystem . isLinux ( );
188187 }
189188
190189 public static boolean isLinuxAPT () {
Original file line number Diff line number Diff line change 2828import javax .xml .xpath .XPath ;
2929import javax .xml .xpath .XPathConstants ;
3030import javax .xml .xpath .XPathFactory ;
31+ import jdk .internal .util .Architecture ;
3132import jdk .jpackage .test .JPackageCommand ;
3233import jdk .jpackage .test .PackageTest ;
3334import jdk .jpackage .test .PackageType ;
@@ -73,7 +74,7 @@ private static void verifyHostArch(JPackageCommand cmd) throws Exception {
7374 "/installer-gui-script/options/@hostArchitectures" ,
7475 doc , XPathConstants .STRING );
7576
76- if ("aarch64" . equals ( System . getProperty ( "os.arch" ) )) {
77+ if (Architecture . isAARCH64 ( )) {
7778 TKit .assertEquals (v , "arm64" ,
7879 "Check value of \" hostArchitectures\" attribute" );
7980 } else {
You can’t perform that action at this time.
0 commit comments