Skip to content

Commit a07245c

Browse files
pelladigaborjhoeller
authored andcommitted
Exclude jdk package in ShadowingClassLoader
Many Java 11 internal classes are located in the jdk package. ShadowingClassLoader should not load them, because it can cause errors, e.g. java.lang.IllegalAccessError: class jdk.internal.reflect.ConstructorAccessorImpl loaded by org.springframework.instrument.classloading.ShadowingClassLoader @2bea5ab4 cannot access jdk/internal/reflect superclass jdk.internal.reflect.MagicAccessorImpl
1 parent f2a5415 commit a07245c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-context/src/main/java/org/springframework/instrument/classloading/ShadowingClassLoader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class ShadowingClassLoader extends DecoratingClassLoader {
4848

4949
/** Packages that are excluded by default. */
5050
public static final String[] DEFAULT_EXCLUDED_PACKAGES =
51-
new String[] {"java.", "javax.", "sun.", "oracle.", "com.sun.", "com.ibm.", "COM.ibm.",
51+
new String[] {"java.", "javax.", "jdk.", "sun.", "oracle.", "com.sun.", "com.ibm.", "COM.ibm.",
5252
"org.w3c.", "org.xml.", "org.dom4j.", "org.eclipse", "org.aspectj.", "net.sf.cglib",
5353
"org.springframework.cglib", "org.apache.xerces.", "org.apache.commons.logging."};
5454

0 commit comments

Comments
 (0)