{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/663594d46a2ebfe53ae26e7e14e56f51?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"663594d46a2ebfe53ae26e7e14e56f51","url":"https://api.github.com/users/smillidge","login":"smillidge","id":939073},"milestone":null,"updated_at":"2011-10-27T17:30:41Z","assignee":null,"labels":[],"comments":6,"closed_at":null,"url":"https://api.github.com/repos/jsr107/jsr107spec/issues/19","body":"The following methods on the Cache Interface should use generics.\r\n\r\n  V get(Object key) throws CacheException;\r\n\r\nShould be V get(K key) throws CacheExcpetion;\r\n\r\nboolean containsKey(Object key) throws CacheException;\r\n\r\nShould be boolean containsKey(K key) throws CacheException;\r\n\r\n   boolean remove(Object key) throws CacheException;\r\n\r\nShould be    boolean remove(K key) throws CacheException;\r\n\r\n  boolean remove(Object key, V oldValue) throws CacheException;\r\n\r\nShould be   boolean remove(K key, V oldValue) throws CacheException;\r\n\r\n V getAndRemove(Object key) throws CacheException;\r\n\r\nShould be  V getAndRemove(K key) throws CacheException;\r\n\r\n\r\n\r\n","html_url":"https://github.com/jsr107/jsr107spec/issues/19","title":"Cache api should use  generics for methods that take a K key","number":19,"id":1734032,"created_at":"2011-09-25T16:26:26Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/42db70d8c1bcc74d7cac5f9ce5e4e7fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"42db70d8c1bcc74d7cac5f9ce5e4e7fb","url":"https://api.github.com/users/edalquist","login":"edalquist","id":633085},"updated_at":"2011-10-27T17:30:41Z","url":"https://api.github.com/repos/jsr107/jsr107spec/issues/comments/2546643","body":"I think the changes Yannis proposes look good, re-reading Effective Java 2 the only place we really need to be careful is with collections and using wildcarded types where appropriate to allows clients to use subclasses correctly. That should be easy enough to test though with a Cache<Object, Object> that then goes and exercises all methods using a String for the key and value.","id":2546643,"created_at":"2011-10-27T17:30:41Z"}}