eclipse-aspectj / aspectj

Other
272 stars 82 forks source link

Weaver returns null instead of original bytes for unwoven classes #280

Closed kriegaex closed 4 months ago

kriegaex commented 4 months ago

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.