Fix ClassCircularityError when running with security manager (#4557)

This commit is contained in:
Lauri Tulmin 2021-11-02 10:30:01 +02:00 committed by GitHub
parent 609795184f
commit 12ec0fa481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,10 @@ public class GlobalIgnoredTypesConfigurer implements IgnoredTypesConfigurer {
.allowClass("java.util.concurrent.")
.allowClass("java.lang.reflect.Proxy")
.allowClass("java.lang.ClassLoader")
// Ignore inner classes of ClassLoader to avoid
// java.lang.ClassCircularityError: java/lang/ClassLoader$1
// when SecurityManager is enabled. ClassLoader$1 is used in ClassLoader.checkPackageAccess
.ignoreClass("java.lang.ClassLoader$")
.allowClass("java.lang.invoke.InnerClassLambdaMetafactory")
// Concurrent instrumentation modifies the structure of
// Cleaner class incompatibly with java9+ modules.