Only unwrap cache implementation for clients who are expecting the Map interface.
This commit is contained in:
parent
06fe21d08e
commit
d179539a31
1 changed files with 4 additions and 1 deletions
|
@ -390,8 +390,11 @@ public class MapCache<K, V> implements Cache<K, V> {
|
|||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T unwrap(Class<T> clazz) {
|
||||
if (Map.class.isAssignableFrom(clazz)) {
|
||||
return (T) map;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue