Skip to content

Commit 72d62a7

Browse files
committed
Cache.get(key, type) explicitly defines an IllegalStateException in case of a type mismatch
Issue: SPR-12145 (cherry picked from commit 2f93759)
1 parent e1a01d4 commit 72d62a7

File tree

1 file changed

+2
-0
lines changed
  • spring-context/src/main/java/org/springframework/cache

1 file changed

+2
-0
lines changed

spring-context/src/main/java/org/springframework/cache/Cache.java

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public interface Cache {
6666
* @return the value to which this cache maps the specified key
6767
* (which may be {@code null} itself), or also {@code null} if
6868
* the cache contains no mapping for this key
69+
* @throws IllegalStateException if a cache entry has been found
70+
* but failed to match the specified type
6971
* @see #get(Object)
7072
* @since 4.0
7173
*/

0 commit comments

Comments
 (0)