diff options
author | Andy Clement <andrew.clement@gmail.com> | 2012-10-01 13:22:37 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2012-10-01 13:22:37 -0700 |
commit | 9a3cc2bc5c824d252140fb3d1e2e27f2163e6d53 (patch) | |
tree | cb4bfaf7de826280933a898850894464b730c5c0 /loadtime | |
parent | 0bbb4f252a1efa7408f55e06fc062baddce0dcba (diff) | |
download | aspectj-9a3cc2bc5c824d252140fb3d1e2e27f2163e6d53.tar.gz aspectj-9a3cc2bc5c824d252140fb3d1e2e27f2163e6d53.zip |
389967
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 10 | ||||
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 0615ff489..6952ec008 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -119,18 +119,18 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { * Callback when we need to define a Closure in the JVM * */ - public void acceptClass(String name, byte[] bytes) { + public void acceptClass (String name, byte[] originalBytes, byte[] wovenBytes) { try { if (shouldDump(name.replace('/', '.'), false)) { - dump(name, bytes, false); + dump(name, wovenBytes, false); } } catch (Throwable throwable) { throwable.printStackTrace(); } if (activeProtectionDomain != null) { - defineClass(loaderRef.getClassLoader(), name, bytes, activeProtectionDomain); + defineClass(loaderRef.getClassLoader(), name, wovenBytes, activeProtectionDomain); } else { - defineClass(loaderRef.getClassLoader(), name, bytes); // could be done lazily using the hook + defineClass(loaderRef.getClassLoader(), name, wovenBytes); // could be done lazily using the hook } } @@ -550,7 +550,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { try { byte[] newBytes = weaveClass(name, bytes, true); - this.generatedClassHandler.acceptClass(name, newBytes); + this.generatedClassHandler.acceptClass(name, bytes, newBytes); } catch (IOException ex) { trace.error("weaveAndDefineConceteAspects", ex); error("exception weaving aspect '" + name + "'", ex); diff --git a/loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java b/loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java index 94ca39af1..f6b013373 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java @@ -194,8 +194,8 @@ public class WeavingURLClassLoader extends ExtensibleURLClassLoader implements W return aspectURLs; } - public void acceptClass(String name, byte[] bytes) { - generatedClasses.put(name, bytes); + public void acceptClass (String name, byte[] classBytes, byte[] weavedBytes) { + generatedClasses.put(name, weavedBytes); } // protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException { |