aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2024-03-02 09:44:03 +0100
committerAlexander Kriegisch <Alexander@Kriegisch.name>2024-03-02 10:34:26 +0100
commit1cdf71119c5e3434772f3b51705b7bb8ba5980fe (patch)
treef60e6846e41faa0c91c6cbe0aa67362734b42ae3 /weaver
parent27f14f4d6ffa6bf5cc79fec29fbddf9274a6ad5f (diff)
downloadaspectj-1cdf71119c5e3434772f3b51705b7bb8ba5980fe.tar.gz
aspectj-1cdf71119c5e3434772f3b51705b7bb8ba5980fe.zip
Improve unwoven class file handling in SimpleCache
Also update lib/aspectj/aspectjweaver.jar to fix integration tests. Fixes #285. Co-authored-by: Kimming Lau <294001791@qq.com> Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/main/java/org/aspectj/weaver/tools/cache/SimpleCache.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/SimpleCache.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/SimpleCache.java
index 0cf759e73..31102c96f 100644
--- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/SimpleCache.java
+++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/SimpleCache.java
@@ -72,8 +72,7 @@ public class SimpleCache {
byte[] res = get(classname, bytes);
if (Arrays.equals(SAME_BYTES, res)) {
- // TODO: Should we return null (means "not transformed") in this case?
- return bytes;
+ return null;
} else {
if (res != null) {
initializeClass(classname, res, loader, protectionDomain);
@@ -97,7 +96,7 @@ public class SimpleCache {
String key = generateKey(classname, origbytes);
- if (Arrays.equals(origbytes, wovenbytes)) {
+ if (wovenbytes == null || Arrays.equals(origbytes, wovenbytes)) {
cacheMap.put(key, SAME_BYTES);
return;
}