CBL-Mariner/SPECS-EXTENDED/xbean/jdk-11-fix.patch

64 строки
3.3 KiB
Diff

From 92c820748ea53dbf7c0250e8ff7798bb846eeafc Mon Sep 17 00:00:00 2001
From: Pawel Winogrodzki <pawelwi@microsoft.com>
Date: Fri, 18 Feb 2022 14:09:27 -0800
Subject: [PATCH] JDK 11 fix.
---
.../java/org/apache/xbean/classpath/SunURLClassPath.java | 6 +++---
.../java/org/apache/xbean/classpath/SystemClassPath.java | 2 +-
.../java/org/apache/xbean/classpath/TomcatClassPath.java | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java b/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java
index 99fe014..24d0780 100644
--- a/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java
+++ b/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java
@@ -49,15 +49,15 @@ public abstract class SunURLClassPath implements ClassPath {
jars[j] = new File(dir, jarNames[j]).toURI().toURL();
}
- sun.misc.URLClassPath path = getURLClassPath(loader);
+ jdk.internal.loader.URLClassPath path = getURLClassPath(loader);
for (int i = 0; i < jars.length; i++) {
//System.out.println("URL "+jars[i]);
path.addURL(jars[i]);
}
}
- protected sun.misc.URLClassPath getURLClassPath(URLClassLoader loader) throws Exception {
- return (sun.misc.URLClassPath) getUcpField().get(loader);
+ protected jdk.internal.loader.URLClassPath getURLClassPath(URLClassLoader loader) throws Exception {
+ return (jdk.internal.loader.URLClassPath) getUcpField().get(loader);
}
private java.lang.reflect.Field getUcpField() throws Exception {
diff --git a/xbean-classpath/src/main/java/org/apache/xbean/classpath/SystemClassPath.java b/xbean-classpath/src/main/java/org/apache/xbean/classpath/SystemClassPath.java
index e8ba28b..9e387ee 100644
--- a/xbean-classpath/src/main/java/org/apache/xbean/classpath/SystemClassPath.java
+++ b/xbean-classpath/src/main/java/org/apache/xbean/classpath/SystemClassPath.java
@@ -51,7 +51,7 @@ public class SystemClassPath extends SunURLClassPath {
}
private void rebuildJavaClassPathVariable() throws Exception {
- sun.misc.URLClassPath cp = getURLClassPath(getSystemLoader());
+ jdk.internal.loader.URLClassPath cp = getURLClassPath(getSystemLoader());
URL[] urls = cp.getURLs();
//for (int i=0; i < urls.length; i++){
// System.out.println(urls[i].toExternalForm());
diff --git a/xbean-classpath/src/main/java/org/apache/xbean/classpath/TomcatClassPath.java b/xbean-classpath/src/main/java/org/apache/xbean/classpath/TomcatClassPath.java
index 3fe31a5..d099f95 100644
--- a/xbean-classpath/src/main/java/org/apache/xbean/classpath/TomcatClassPath.java
+++ b/xbean-classpath/src/main/java/org/apache/xbean/classpath/TomcatClassPath.java
@@ -102,7 +102,7 @@ public class TomcatClassPath extends SunURLClassPath {
protected void rebuild() {
try {
- sun.misc.URLClassPath cp = getURLClassPath((URLClassLoader) getClassLoader());
+ jdk.internal.loader.URLClassPath cp = getURLClassPath((URLClassLoader) getClassLoader());
URL[] urls = cp.getURLs();
//for (int i=0; i < urls.length; i++){
// System.out.println(urls[i].toExternalForm());
--
2.17.1