Skip to content

Commit 21d6eac

Browse files
committed
update allowed classes
1 parent 10af0c7 commit 21d6eac

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

org-code-javabuilder/lib/src/main/java/org/code/javabuilder/UserClassLoader.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import java.lang.invoke.LambdaMetafactory;
66
import java.lang.invoke.StringConcatFactory;
7+
import java.lang.reflect.InvocationTargetException;
78
import java.lang.reflect.Method;
89
import java.net.URL;
910
import java.net.URLClassLoader;
@@ -114,9 +115,10 @@ private boolean isInAllowedPackage(String[] allowedPackageList, String name) {
114115
StringBuffer.class.getName(),
115116
StringBuilder.class.getName(),
116117
Throwable.class.getName(),
117-
ThreadLocal.class.getName(),
118-
CloneNotSupportedException.class.getName(),
119-
Method.class.getName());
118+
ThreadLocal.class.getName(), // EasyMock support
119+
CloneNotSupportedException.class.getName(), // EasyMock support
120+
Method.class.getName(), // EasyMock support
121+
InvocationTargetException.class.getName()); // EasyMock support
120122

121123
// Allowed packages (any individual class is allowed from these classes)
122124
private static final String[] allowedPackages =
@@ -132,7 +134,7 @@ private boolean isInAllowedPackage(String[] allowedPackageList, String name) {
132134
"org.code.theater.",
133135
"org.code.lang",
134136
"org.easymock.",
135-
"jdk.internal.reflect.SerializationConstructorAccessorImpl"
137+
"jdk.internal.reflect.SerializationConstructorAccessorImpl" // EasyMock support
136138
};
137139

138140
// Allowed packages for code with elevated permissions, such as validation code.

0 commit comments

Comments
 (0)