This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 153fb04e21 Fix backport
153fb04e21 is described below
commit 153fb04e21dc8e558f4863a5ff882142902c63b4
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Nov 6 11:20:16 2024 +0000
Fix backport
---
java/org/apache/tomcat/util/buf/ToStringUtil.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/tomcat/util/buf/ToStringUtil.java
b/java/org/apache/tomcat/util/buf/ToStringUtil.java
index 1d562d6f6d..943d14f63d 100644
--- a/java/org/apache/tomcat/util/buf/ToStringUtil.java
+++ b/java/org/apache/tomcat/util/buf/ToStringUtil.java
@@ -84,9 +84,12 @@ public class ToStringUtil {
result.append("\n");
}
}
- } else if (classLoader == ClassLoader.getPlatformClassLoader()) {
- // From Java 9 the internal class loaders no longer extend
- // URLCLassLoader
+ } else if (classLoader ==
ClassLoader.getSystemClassLoader().getParent()) {
+ /*
+ * ClassLoader.getPlatformClassLoader() is not available in Java
8. When running on Java 9 onwards where
+ * the internal class loaders no longer extend URLCLassLoaderthe
platform class loader is the parent of the
+ * system class loader.
+ */
result.append(INDENT);
result.append(INDENT);
result.append(sm.getString("toStringUtil.classpath.platform"));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]