Project: AspectJ
Bug 389967 Weaved aspects mechanism does not take into account modified classes
Reported: 2012-09-20 02:38:31 | Status: resolved fixed

The current caching mechanism assumes that if the same class is encountered then its cached weaved version can be used. However, the mechanism uses only the (fully qualified) class name to identify the class and does not take into account the fact that the class bytes may have changed (e.g., the user re-compiled and re-deployed some changes to the same class).

Files changed in fix:
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java org.aspectj.matcher/src/org/aspectj/weaver/tools/GeneratedClassHandler.java util/src/org/aspectj/util/LangUtil.java weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java weaver/src/org/aspectj/weaver/tools/cache/CacheBacking.java weaver/src/org/aspectj/weaver/tools/cache/CacheStatistics.java weaver/src/org/aspectj/weaver/tools/cache/CachedClassEntry.java weaver/src/org/aspectj/weaver/tools/cache/CachedClassReference.java weaver/src/org/aspectj/weaver/tools/cache/DefaultCacheFactory.java weaver/src/org/aspectj/weaver/tools/cache/DefaultCacheKeyResolver.java weaver/src/org/aspectj/weaver/tools/cache/DefaultFileCacheBacking.java weaver/src/org/aspectj/weaver/tools/cache/GeneratedCachedClassHandler.java weaver/src/org/aspectj/weaver/tools/cache/WeavedClassCache.java weaver/testsrc/org/aspectj/weaver/tools/cache/DefaultFileCacheBackingTest.java weaver/testsrc/org/aspectj/weaver/tools/cache/WeavedClassCacheTest.java