Skip to content

Commit

Permalink
fix constructor chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias-Boulay committed Mar 27, 2024
1 parent 718ec92 commit 301d39b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion patches/jdk17u_android.diff
Original file line number Diff line number Diff line change
Expand Up @@ -2534,7 +2534,7 @@ index c1caeb18c..f044f587d 100644
Class<? extends ClassLoader> callerClass =
Reflection.getCallerClass().asSubclass(ClassLoader.class);
diff --git a/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java b/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java
index cd7406ac5..5290b9e55 100644
index cd7406ac5..f089fa368 100644
--- a/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java
+++ b/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java
@@ -35,4 +35,5 @@ import java.net.MalformedURLException;
Expand All @@ -2550,3 +2550,17 @@ index cd7406ac5..5290b9e55 100644
+ extends URLClassLoader
{
static {
@@ -192,5 +193,5 @@ public class BuiltinClassLoader
BuiltinClassLoader(String name, BuiltinClassLoader parent, URLClassPath ucp) {
// ensure getParent() returns null when the parent is the boot loader
- super(name, parent == null || parent == ClassLoaders.bootLoader() ? null : parent);
+ super(name, new URL[]{}, parent == null || parent == ClassLoaders.bootLoader() ? null : parent);

this.parent = parent;
@@ -927,5 +928,5 @@ public class BuiltinClassLoader
* @throws SecurityException if the package name is untrusted in the manifest
*/
- private Package definePackage(String pn, Manifest man, URL url) {
+ protected Package definePackage(String pn, Manifest man, URL url) {
String specTitle = null;
String specVersion = null;

0 comments on commit 301d39b

Please sign in to comment.