Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.2Release
-
Fix Version/s: 2.5.0Release
-
Component/s: Inferencing Engine
-
Labels:None
-
Number of attachments :
Description
In the snippet below, MyMap.get() should be inferred as the get() method on WeakReference, but it isn't.
//@Typed class RemoteMessageChannel<M extends Serializable> {// extends MessageChannel<M> { // static class MyMap<K,V> extends HashMap<K,WeakReference<V>> { static class MyMap extends HashMap<String,WeakReference<Class>> { // V putIfNotYet(K key, V value) { // } } MyMap cache; void receiveBytes(String name) { ClassLoader parent if (name == this.class.name) this.class else { def res = cache.get(name)?.get() if (res == this.class) throw new ClassNotFoundException() if (!res) { try { res = parent.loadClass(name) } catch (ClassNotFoundException e) { cache.putIfNotYet(name, this.class) throw e } cache.putIfNotYet(name, res) } // return res } } }