{"action":"closed","issue":{"url":"https://api.github.com/repos/google/error-prone/issues/307","labels_url":"https://api.github.com/repos/google/error-prone/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/google/error-prone/issues/307/comments","events_url":"https://api.github.com/repos/google/error-prone/issues/307/events","html_url":"https://github.com/google/error-prone/issues/307","id":60945131,"number":307,"title":"Check for generics on calls to non-generic methods/constructors","user":{"login":"cgdecker","id":101568,"avatar_url":"https://avatars.githubusercontent.com/u/101568?v=3","gravatar_id":"","url":"https://api.github.com/users/cgdecker","html_url":"https://github.com/cgdecker","followers_url":"https://api.github.com/users/cgdecker/followers","following_url":"https://api.github.com/users/cgdecker/following{/other_user}","gists_url":"https://api.github.com/users/cgdecker/gists{/gist_id}","starred_url":"https://api.github.com/users/cgdecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgdecker/subscriptions","organizations_url":"https://api.github.com/users/cgdecker/orgs","repos_url":"https://api.github.com/users/cgdecker/repos","events_url":"https://api.github.com/users/cgdecker/events{/privacy}","received_events_url":"https://api.github.com/users/cgdecker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"cushon","id":478458,"avatar_url":"https://avatars.githubusercontent.com/u/478458?v=3","gravatar_id":"","url":"https://api.github.com/users/cushon","html_url":"https://github.com/cushon","followers_url":"https://api.github.com/users/cushon/followers","following_url":"https://api.github.com/users/cushon/following{/other_user}","gists_url":"https://api.github.com/users/cushon/gists{/gist_id}","starred_url":"https://api.github.com/users/cushon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cushon/subscriptions","organizations_url":"https://api.github.com/users/cushon/orgs","repos_url":"https://api.github.com/users/cushon/repos","events_url":"https://api.github.com/users/cushon/events{/privacy}","received_events_url":"https://api.github.com/users/cushon/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-03-13T00:26:42Z","updated_at":"2015-04-06T18:42:44Z","closed_at":"2015-04-06T18:42:44Z","body":"A recent [StackOverflow question](http://stackoverflow.com/questions/29015880/looking-for-java-1-6-workaround-to-apparent-compiler-issue) reminded me of the very strange fact that it's possible to provide (any number of!) generic type arguments to a non-generic method or constructor.\r\n\r\nFor example:\r\n\r\n    // Like in the question\r\n    Cache<Key, Value> cache = CacheBuilder.<Key, Value>from(spec).build();\r\n    // Just weird\r\n    String s = new <Number, String, NullPointerException>String(chars);\r\n\r\nAs far as I know, this has no effect whatsoever and can cause confusion when someone expects that the generics are doing something and they aren't. I don't imagine this happens too often, but it seems like it might be a reasonable thing to make an error."}}