mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-26 08:59:09 +00:00
Fix broken build
This commit fixes the direct use of Java8 API Issue: SPR-14853
This commit is contained in:
+3
-3
@@ -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