File tree Expand file tree Collapse file tree
cache-ri-impl/src/main/java/org/jsr107/ri Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -241,24 +241,7 @@ public Cache getCache(String cacheName) {
241241 throw new IllegalStateException ();
242242 }
243243 synchronized (caches ) {
244- RICache cache = caches .get (cacheName );
245-
246- if (cache == null ) {
247- return null ;
248- } else {
249- Configuration configuration = cache .getConfiguration (CompleteConfiguration .class );
250-
251- if (configuration .getKeyType ().equals (Object .class ) &&
252- configuration .getValueType ().equals (Object .class )) {
253- return cache ;
254- } else {
255- throw new IllegalArgumentException ("Cache " + cacheName + " was " +
256- "defined with specific types Cache<" +
257- configuration .getKeyType () + ", " + configuration .getValueType () + "> " +
258- "in which case CacheManager.getCache(String, Class, Class) must be used" );
259- }
260-
261- }
244+ return caches .get (cacheName );
262245 }
263246 }
264247
You can’t perform that action at this time.
0 commit comments