--- a/test/hotspot/jtreg/runtime/appcds/CaseSensitiveClassPath.java Thu Feb 15 09:22:25 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/CaseSensitiveClassPath.java Wed Feb 14 07:08:25 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -76,17 +76,17 @@
} else {
jarPathUpper = Paths.get(appJarUpper);
}
-
- out = TestCommon.exec(appJarUpper, "Hello", "-Xlog:class+path=info",
- "-Xlog:cds");
- if (TestCommon.isUnableToMap(out))
- return;
+ boolean isSameFile = Files.isSameFile(jarPath, jarPathUpper);
- if (Files.isSameFile(jarPath, jarPathUpper)) {
- TestCommon.checkExec(out, "Hello World");
- } else {
- out.shouldContain("shared class paths mismatch")
- .shouldHaveExitValue(1);
- }
- }
+ TestCommon.run("-cp", appJarUpper, "Hello", "-Xlog:class+path=info",
+ "-Xlog:cds")
+ .ifNoMappingFailure(output -> {
+ if (isSameFile) {
+ output.shouldContain("Hello World");
+ } else {
+ output.shouldContain("shared class paths mismatch");
+ output.shouldHaveExitValue(1);
+ }
+ });
+ }
}