Browse Source

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>
tags/V1_9_21_2
Alexander Kriegisch 1 month ago
parent
commit
1cdf71119c

BIN
lib/aspectj/lib/aspectjweaver.jar View File


+ 2
- 3
weaver/src/main/java/org/aspectj/weaver/tools/cache/SimpleCache.java View File

@@ -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;
}

Loading…
Cancel
Save