]> source.dussan.org Git - aspectj.git/commit
Weaver returns null instead of original bytes for unwoven classes
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 7 Feb 2024 02:35:55 +0000 (09:35 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 7 Feb 2024 04:48:39 +0000 (11:48 +0700)
commit3e3c83712e7eb41ed2d769280092bc83b8492a3d
tree2bdeb96603ef1c209f000d01ae1b1a9365e3c87f
parent3102ea8fb21493bdf0080d03a8234c2a6cb952ad
Weaver returns null instead of original bytes for unwoven classes

This change makes sense independently of #277, but also enables using

  - cp "my.jar;aspectjweaver.jar"
  -XX:+AllowArchivingWithJavaAgent
  -javaagent:aspectjweaver.jar

while creating a CDS archive. Afterward, the application can be run in
its woven state from the CDS archive even without '-javaagent', because
the byte code was archived in its woven state ("poor man's AJC"). See
https://github.com/eclipse-aspectj/aspectj/issues/277#issuecomment-1931142753
for details.

Fixes #277.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java
loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessor.java
loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java
loadtime/src/main/java/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
weaver/src/main/java/org/aspectj/weaver/tools/WeavingAdaptor.java
weaver/src/main/java/org/aspectj/weaver/tools/cache/SimpleCache.java