From 3531ed77f519d4e45b9a41abe2293349e0ede6e6 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Thu, 4 Apr 2024 12:51:58 +0200 Subject: [PATCH] Raise ClassLoaderWeavingAdaptor::defineClass visibility to protected Relates to https://github.com/eclipse-aspectj/ajdt/issues/57 and it a precondition for refactoring phase 2 of child class OSGiWeavingAdaptor::defineClass, which can now directly call the super methods instead of using reflection. Signed-off-by: Alexander Kriegisch --- .../aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index d0484f6b4..a18400e90 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -1225,11 +1225,11 @@ public Class loadClass(String name) throws ClassNotFoundException { } } - private void defineClass(ClassLoader loader, String name, byte[] bytes) { + protected void defineClass(ClassLoader loader, String name, byte[] bytes) { defineClass(loader, name, bytes, null); } - private void defineClass(ClassLoader loader, String name, byte[] bytes, ProtectionDomain protectionDomain) { + protected void defineClass(ClassLoader loader, String name, byte[] bytes, ProtectionDomain protectionDomain) { if (trace.isTraceEnabled()) trace.enter("defineClass", this, new Object[] { loader, name, bytes }); debug("generating class '" + name + "'");