{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/6beae78fd4d033568534f4c1155623c8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6beae78fd4d033568534f4c1155623c8","url":"https://api.github.com/users/gregrluck","login":"gregrluck","id":225924},"milestone":null,"updated_at":"2011-11-10T02:06:32Z","labels":[],"assignee":null,"closed_at":null,"comments":1,"url":"https://api.github.com/repos/jsr107/jsr107spec/issues/37","body":"(From Terracotta review)\r\n\r\nThe CacheManager.getCaches() method appears to declare an bizarre return type:\r\n\r\n<K, V> Set<Cache<K, V>> getCaches();\r\n\r\nUnless the user has knowledge of the common key and value super types for all of the caches contained in this cache manager the generic types supplied on calling this method will just lead to troublesome ClassCastExceptions down the road.  We believe the more correct generic typing here would be:\r\n\r\nSet<Cache<?, ?>> getCaches();\r\n\r\nWe also find the usage of a Set here confusing - the Cache interface declares no explicit equals contract.  This leaves implementations free to define there own.  A particularly evil implementation could define Cache equality to be universal (all caches are equal to all others).  This method would then find it impossible to return the full set of caches from the cache manager while still honoring the Set semantic.  It would seem that the fully correct method signature here should be:\r\n\r\nCollection<Cache<?, ?>> getCaches();","html_url":"https://github.com/jsr107/jsr107spec/issues/37","title":"Change getCaches generics and signature","number":37,"id":2193959,"created_at":"2011-11-10T02:01:52Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/6beae78fd4d033568534f4c1155623c8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6beae78fd4d033568534f4c1155623c8","url":"https://api.github.com/users/gregrluck","login":"gregrluck","id":225924},"updated_at":"2011-11-10T02:06:32Z","url":"https://api.github.com/repos/jsr107/jsr107spec/issues/comments/2690613","body":"The idea of a Set is that it seems to meet \"A collection that contains no duplicate elements\".\r\n\r\nWe can and probably should define equals thus overcoming the raised objection.","id":2690613,"created_at":"2011-11-10T02:06:32Z"}}