Fix broken build
This commit fixes the direct use of Java8 API Issue: SPR-14853
This commit is contained in:
@@ -424,9 +424,9 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
|
||||
}
|
||||
|
||||
private Object wrapCacheValue(Method method, Object cacheValue) {
|
||||
if (method.getReturnType() == Optional.class &&
|
||||
(cacheValue == null || cacheValue.getClass() != Optional.class)) {
|
||||
return Optional.ofNullable(cacheValue);
|
||||
if (method.getReturnType() == javaUtilOptionalClass &&
|
||||
(cacheValue == null || cacheValue.getClass() != javaUtilOptionalClass)) {
|
||||
return OptionalUnwrapper.wrap(cacheValue);
|
||||
}
|
||||
return cacheValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user