{"action":"closed","issue":{"url":"https://api.github.com/repos/henri-tremblay/mytest/issues/150","labels_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/150/comments","events_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/150/events","html_url":"https://github.com/henri-tremblay/mytest/issues/150","id":83255561,"number":150,"title":"Wildcard generics problem","user":{"login":"henri-tremblay","id":1216819,"avatar_url":"https://avatars.githubusercontent.com/u/1216819?v=3","gravatar_id":"","url":"https://api.github.com/users/henri-tremblay","html_url":"https://github.com/henri-tremblay","followers_url":"https://api.github.com/users/henri-tremblay/followers","following_url":"https://api.github.com/users/henri-tremblay/following{/other_user}","gists_url":"https://api.github.com/users/henri-tremblay/gists{/gist_id}","starred_url":"https://api.github.com/users/henri-tremblay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henri-tremblay/subscriptions","organizations_url":"https://api.github.com/users/henri-tremblay/orgs","repos_url":"https://api.github.com/users/henri-tremblay/repos","events_url":"https://api.github.com/users/henri-tremblay/events{/privacy}","received_events_url":"https://api.github.com/users/henri-tremblay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/core","name":"core","color":"f7c6c7"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/fixed","name":"fixed","color":"c7def8"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/major","name":"major","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":{"login":"henri-tremblay","id":1216819,"avatar_url":"https://avatars.githubusercontent.com/u/1216819?v=3","gravatar_id":"","url":"https://api.github.com/users/henri-tremblay","html_url":"https://github.com/henri-tremblay","followers_url":"https://api.github.com/users/henri-tremblay/followers","following_url":"https://api.github.com/users/henri-tremblay/following{/other_user}","gists_url":"https://api.github.com/users/henri-tremblay/gists{/gist_id}","starred_url":"https://api.github.com/users/henri-tremblay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henri-tremblay/subscriptions","organizations_url":"https://api.github.com/users/henri-tremblay/orgs","repos_url":"https://api.github.com/users/henri-tremblay/repos","events_url":"https://api.github.com/users/henri-tremblay/events{/privacy}","received_events_url":"https://api.github.com/users/henri-tremblay/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/henri-tremblay/mytest/milestones/1","html_url":"https://github.com/henri-tremblay/mytest/milestones/2.4","labels_url":"https://api.github.com/repos/henri-tremblay/mytest/milestones/1/labels","id":1139050,"number":1,"title":"2.4","description":"EasyMock 2.4","creator":{"login":"henri-tremblay","id":1216819,"avatar_url":"https://avatars.githubusercontent.com/u/1216819?v=3","gravatar_id":"","url":"https://api.github.com/users/henri-tremblay","html_url":"https://github.com/henri-tremblay","followers_url":"https://api.github.com/users/henri-tremblay/followers","following_url":"https://api.github.com/users/henri-tremblay/following{/other_user}","gists_url":"https://api.github.com/users/henri-tremblay/gists{/gist_id}","starred_url":"https://api.github.com/users/henri-tremblay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henri-tremblay/subscriptions","organizations_url":"https://api.github.com/users/henri-tremblay/orgs","repos_url":"https://api.github.com/users/henri-tremblay/repos","events_url":"https://api.github.com/users/henri-tremblay/events{/privacy}","received_events_url":"https://api.github.com/users/henri-tremblay/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":34,"state":"closed","created_at":"2015-05-29T01:57:42Z","updated_at":"2015-06-01T01:26:55Z","due_on":"2008-07-02T04:00:00Z","closed_at":"2015-05-29T01:57:42Z"},"comments":0,"created_at":"2015-06-01T01:26:55Z","updated_at":"2015-06-01T01:26:55Z","closed_at":"2015-06-01T01:26:55Z","body":"*Migrated from:* CodeHaus issue EASYMOCK-9\n*Original reporter:* Henri Tremblay\n\n---------------------------------------------------------\nFollowing code is not compiling:\n\npublic class SomeTest\n{\n  public static interface A\n  {\n    public Class<?> get();\n  }\n  \n  @Test\n  public void testSomething()\n  {\n    A mock = EasyMock createMock(A.class);\n\n    EasyMock.expect(mock.get()).andReturn(String.class);\n    replay(mock);\n  }\n}\n\nError message is as follows:\n\nThe method andReturn(Class<capture#2-of ?>) in the type \n IExpectationSetters<Class<capture#2-of ?>> is not applicable for the arguments \n (Class<String>)\n\nTo make it valid I need to change Class<?> to raw type Class. Then it works.\n\nObviously following code is perfectly valid:\n\npublic class StringA implements A\n{\n  public Class<?> get() { return String.class; }\n}\n"}}