File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
byte-buddy-dep/src/main/java/net/bytebuddy/utility Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,9 @@ class ForClassFileApi implements AsmClassReader {
233233 /**
234234 * A dispatcher to interact with {@code codes.rafael.asmjdkbridge.JdkClassReader}.
235235 */
236- protected static final JdkClassReader DISPATCHER = doPrivileged (JavaDispatcher .of (JdkClassReader .class ));
236+ protected static final JdkClassReader DISPATCHER = doPrivileged (JavaDispatcher .of (
237+ JdkClassReader .class ,
238+ ForClassFileApi .class .getClassLoader ()));
237239
238240 /**
239241 * The class reader that represents the class file to be read.
Original file line number Diff line number Diff line change @@ -354,7 +354,9 @@ class ForClassFileApi implements AsmClassWriter {
354354 /**
355355 * The dispatcher for interacting with a {@code codes.rafael.asmjdkbridge.JdkClassWriter}.
356356 */
357- private static final JdkClassWriter DISPATCHER = doPrivileged (JavaDispatcher .of (JdkClassWriter .class ));
357+ private static final JdkClassWriter DISPATCHER = doPrivileged (JavaDispatcher .of (
358+ JdkClassWriter .class ,
359+ ForClassFileApi .class .getClassLoader ()));
358360
359361 /**
360362 * The represented class writer.
@@ -380,7 +382,6 @@ public ForClassFileApi(ClassVisitor classWriter) {
380382 * @param <T> The type of the action's resolved value.
381383 * @return The action's resolved value.
382384 */
383- @ MaybeNull
384385 @ AccessControllerPlugin .Enhance
385386 private static <T > T doPrivileged (PrivilegedAction <T > action ) {
386387 return action .run ();
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ public static <T> PrivilegedAction<T> of(Class<T> type) {
148148 * @param <T> The resolved type.
149149 * @return An action for creating an appropriate dispatcher.
150150 */
151- protected static <T > PrivilegedAction <T > of (Class <T > type , @ MaybeNull ClassLoader classLoader ) {
151+ public static <T > PrivilegedAction <T > of (Class <T > type , @ MaybeNull ClassLoader classLoader ) {
152152 return of (type , classLoader , GENERATE );
153153 }
154154
You can’t perform that action at this time.
0 commit comments