diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-03-02 09:44:03 +0100 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-03-02 10:34:26 +0100 |
commit | 1cdf71119c5e3434772f3b51705b7bb8ba5980fe (patch) | |
tree | f60e6846e41faa0c91c6cbe0aa67362734b42ae3 /weaver | |
parent | 27f14f4d6ffa6bf5cc79fec29fbddf9274a6ad5f (diff) | |
download | aspectj-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.java | 5 |
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; } |