diff --git a/.hgtags b/.hgtags index 6d18b2a6b90..ce5a2b3afd7 100644 --- a/.hgtags +++ b/.hgtags @@ -533,3 +533,4 @@ cc4098b3bc10d1c390384289025fea7b0d4b9e93 jdk-13+0 50677f43ac3df9a8684222b8893543c60f3aa0bd jdk-13+2 de9fd809bb475401aad188eab2264226788aad81 jdk-12+26 642346a11059b9f283110dc301a24ed43b76a94e jdk-13+3 +f15d443f97318e9b40e6f451e327ff69ed4ec361 jdk-12+27 diff --git a/src/hotspot/share/classfile/systemDictionaryShared.cpp b/src/hotspot/share/classfile/systemDictionaryShared.cpp index c9333114a26..91cfeee4e5c 100644 --- a/src/hotspot/share/classfile/systemDictionaryShared.cpp +++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, 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 @@ -503,26 +503,33 @@ Handle SystemDictionaryShared::get_shared_protection_domain(Handle class_loader, Handle SystemDictionaryShared::get_shared_protection_domain(Handle class_loader, ModuleEntry* mod, TRAPS) { ClassLoaderData *loader_data = mod->loader_data(); - Handle protection_domain; if (mod->shared_protection_domain() == NULL) { Symbol* location = mod->location(); if (location != NULL) { - Handle url_string = java_lang_String::create_from_symbol( - location, CHECK_(protection_domain)); + Handle location_string = java_lang_String::create_from_symbol( + location, CHECK_NH); + Handle url; JavaValue result(T_OBJECT); - Klass* classLoaders_klass = - SystemDictionary::jdk_internal_loader_ClassLoaders_klass(); - JavaCalls::call_static(&result, classLoaders_klass, vmSymbols::toFileURL_name(), + if (location->starts_with("jrt:/")) { + url = JavaCalls::construct_new_instance(SystemDictionary::URL_klass(), + vmSymbols::string_void_signature(), + location_string, CHECK_NH); + } else { + Klass* classLoaders_klass = + SystemDictionary::jdk_internal_loader_ClassLoaders_klass(); + JavaCalls::call_static(&result, classLoaders_klass, vmSymbols::toFileURL_name(), vmSymbols::toFileURL_signature(), - url_string, CHECK_(protection_domain)); - Handle url = Handle(THREAD, (oop)result.get_jobject()); + location_string, CHECK_NH); + url = Handle(THREAD, (oop)result.get_jobject()); + } - Handle pd = get_protection_domain_from_classloader(class_loader, url, THREAD); + Handle pd = get_protection_domain_from_classloader(class_loader, url, + CHECK_NH); mod->set_shared_protection_domain(loader_data, pd); } } - protection_domain = Handle(THREAD, mod->shared_protection_domain()); + Handle protection_domain(THREAD, mod->shared_protection_domain()); assert(protection_domain.not_null(), "sanity"); return protection_domain; } diff --git a/src/java.base/share/classes/java/lang/String.java b/src/java.base/share/classes/java/lang/String.java index 34629e86ba3..8e91968ff3b 100644 --- a/src/java.base/share/classes/java/lang/String.java +++ b/src/java.base/share/classes/java/lang/String.java @@ -2813,8 +2813,7 @@ public final class String * lines are then concatenated and returned. *
* If {@code n > 0} then {@code n} spaces (U+0020) are inserted at the - * beginning of each line. {@link String#isBlank() Blank lines} are - * unaffected. + * beginning of each line. *
* If {@code n < 0} then up to {@code n}
* {@link Character#isWhitespace(int) white space characters} are removed
@@ -2849,7 +2848,7 @@ public final class String
: lines();
if (n > 0) {
final String spaces = " ".repeat(n);
- stream = stream.map(s -> s.isBlank() ? s : spaces + s);
+ stream = stream.map(s -> spaces + s);
} else if (n == Integer.MIN_VALUE) {
stream = stream.map(s -> s.stripLeading());
} else if (n < 0) {
diff --git a/test/hotspot/jtreg/compiler/interpreter/TestVerifyStackAfterDeopt.java b/test/hotspot/jtreg/compiler/interpreter/TestVerifyStackAfterDeopt.java
index 7eddc53f60b..9bb62b54b69 100644
--- a/test/hotspot/jtreg/compiler/interpreter/TestVerifyStackAfterDeopt.java
+++ b/test/hotspot/jtreg/compiler/interpreter/TestVerifyStackAfterDeopt.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -28,6 +28,7 @@
* @bug 8209825
* @summary Checks VerifyStack after deoptimization of array allocation slow call
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:TieredStopAtLevel=1
+ * -XX:AllocatePrefetchLines=1 -XX:AllocateInstancePrefetchLines=1 -XX:AllocatePrefetchStepSize=16 -XX:AllocatePrefetchDistance=1
* -XX:MinTLABSize=1k -XX:TLABSize=1k
* -XX:+DeoptimizeALot -XX:+VerifyStack
* compiler.interpreter.TestVerifyStackAfterDeopt
diff --git a/test/hotspot/jtreg/runtime/appcds/ProtectionDomain.java b/test/hotspot/jtreg/runtime/appcds/ProtectionDomain.java
index 8d1628fa05c..56104e928b7 100644
--- a/test/hotspot/jtreg/runtime/appcds/ProtectionDomain.java
+++ b/test/hotspot/jtreg/runtime/appcds/ProtectionDomain.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, 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
@@ -48,25 +48,24 @@ public class ProtectionDomain {
TestCommon.list("ProtDomain",
"ProtDomainBOther",
"java/util/Dictionary",
- "sun/tools/javac/Main",
+ "com/sun/tools/javac/Main",
"jdk/nio/zipfs/ZipInfo",
"java/net/URL",
"sun/rmi/rmic/Main",
"com/sun/jndi/dns/DnsName"));
- OutputAnalyzer output;
-
// First class is loaded from CDS, second class is loaded from JAR
- output = TestCommon.exec(appJar, "ProtDomain");
- TestCommon.checkExec(output, "Protection Domains match");
+ TestCommon.run("-cp", appJar, "ProtDomain")
+ .assertNormalExit("Protection Domains match");
// First class is loaded from JAR, second class is loaded from CDS
- output = TestCommon.exec(appJar, "ProtDomainB");
- TestCommon.checkExec(output, "Protection Domains match");
+ TestCommon.run("-cp", appJar, "ProtDomainB")
+ .assertNormalExit("Protection Domains match");
// Test ProtectionDomain for application and extension module classes from the
// "modules" jimage
- output = TestCommon.exec(appJar, "JimageClassProtDomain");
- output.shouldNotContain("Failed: Protection Domains do not match");
+ TestCommon.run("-cp", appJar, "JimageClassProtDomain")
+ .assertNormalExit(output -> output.shouldNotContain(
+ "Failed: Protection Domains do not match"));
}
}
diff --git a/test/hotspot/jtreg/runtime/appcds/test-classes/JimageClassProtDomain.java b/test/hotspot/jtreg/runtime/appcds/test-classes/JimageClassProtDomain.java
index e47aaaa8a36..4e4eef965d3 100644
--- a/test/hotspot/jtreg/runtime/appcds/test-classes/JimageClassProtDomain.java
+++ b/test/hotspot/jtreg/runtime/appcds/test-classes/JimageClassProtDomain.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -37,7 +37,7 @@ public class JimageClassProtDomain {
"java.util.Dictionary", "java.util.ServiceConfigurationError"},
{"Loading shared app module class first",
- "sun.tools.javac.Main", "sun.tools.javac.BatchParser"},
+ "com.sun.tools.javac.Main", "com.sun.tools.javac.code.Symbol"},
{"Loading shared ext module class first",
"jdk.nio.zipfs.ZipInfo", "jdk.nio.zipfs.ZipPath"},
@@ -46,7 +46,7 @@ public class JimageClassProtDomain {
"java.net.HttpCookie", "java.net.URL"},
{"Loading non-shared app module class first",
- "sun.rmi.rmic.RMIGenerator", "sun.rmi.rmic.Main"},
+ "com.sun.tools.sjavac.Util", "com.sun.tools.sjavac.Main"},
{"Loading non-shared ext module class first",
"com.sun.jndi.dns.Resolver", "com.sun.jndi.dns.DnsName"}};
@@ -61,13 +61,16 @@ public class JimageClassProtDomain {
Class c1 = Class.forName(shared);
Class c2 = Class.forName(nonShared);
if (c1.getProtectionDomain() != c2.getProtectionDomain()) {
- System.out.println("Failed: Protection Domains do not match!");
System.out.println(c1.getProtectionDomain());
System.out.println(c1.getProtectionDomain().getCodeSource());
System.out.println(c2.getProtectionDomain());
System.out.println(c2.getProtectionDomain().getCodeSource());
- System.exit(1);
+ throw new RuntimeException("Failed: Protection Domains do not match!");
} else {
+ System.out.println(c1.getProtectionDomain());
+ System.out.println(c1.getProtectionDomain().getCodeSource());
+ System.out.println(c2.getProtectionDomain());
+ System.out.println(c2.getProtectionDomain().getCodeSource());
System.out.println("Passed: Protection Domains match.");
}
}
diff --git a/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomain.java b/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomain.java
index fe88bfb1bb0..df8d11eb263 100644
--- a/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomain.java
+++ b/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomain.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -42,8 +42,7 @@ public class ProtDomain {
if (mine == his) {
System.out.println("Protection Domains match");
} else {
- System.out.println("Protection Domains do not match!");
- System.exit(1);
+ throw new RuntimeException("Protection Domains do not match!");
}
}
}
diff --git a/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomainB.java b/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomainB.java
index 01a36ccf706..e2f5a29f221 100644
--- a/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomainB.java
+++ b/test/hotspot/jtreg/runtime/appcds/test-classes/ProtDomainB.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -42,8 +42,7 @@ public class ProtDomainB {
if (mine == his) {
System.out.println("Protection Domains match");
} else {
- System.out.println("Protection Domains do not match!");
- System.exit(1);
+ throw new RuntimeException("Protection Domains do not match!");
}
}
}
diff --git a/test/jdk/java/lang/String/Indent.java b/test/jdk/java/lang/String/Indent.java
index 15a8c503cac..0c09807da5e 100644
--- a/test/jdk/java/lang/String/Indent.java
+++ b/test/jdk/java/lang/String/Indent.java
@@ -67,7 +67,7 @@ public class Indent {
Stream