My team has been using the @Cachable annotation in Spring and caching Optional<> in Java. We just upgraded to Spring 4.3 and started getting errors because or caches do not allow nulls and Spring was unwrapping the Optional and attempting to put in null when it was empty.
I tried looking in the docs but I could not find anywhere that explains how Spring behaves when it goes to the cache, finds null and is supposed to return an Optional<>. Can anyone provide some context; will it convert it to an empty Optional or will it throw any error?