aboutsummaryrefslogtreecommitdiffstats
path: root/loadtime
diff options
context:
space:
mode:
Diffstat (limited to 'loadtime')
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java
index 4dbda9023..58fd3c557 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java
@@ -20,6 +20,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Optional;
import java.util.Set;
import java.util.StringTokenizer;
@@ -104,9 +105,9 @@ public class Aj implements ClassPreProcessor {
synchronized (classLoader) {
if (SimpleCacheFactory.isEnabled()) {
- byte[] cacheBytes= laCache.getAndInitialize(className, bytes, classLoader, protectionDomain);
- if (cacheBytes!=null){
- return cacheBytes;
+ Optional<byte[]> cacheBytes = laCache.getAndInitialize(className, bytes, classLoader, protectionDomain);
+ if (cacheBytes != null){
+ return cacheBytes.orElse(null);
}
}