{"action":"created","issue":{"url":"https://api.github.com/repos/jmockit/jmockit1/issues/347","repository_url":"https://api.github.com/repos/jmockit/jmockit1","labels_url":"https://api.github.com/repos/jmockit/jmockit1/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/jmockit/jmockit1/issues/347/comments","events_url":"https://api.github.com/repos/jmockit/jmockit1/issues/347/events","html_url":"https://github.com/jmockit/jmockit1/issues/347","id":179649137,"number":347,"title":"\"GenericArrayTypeImpl cannot be cast to Class\" when MockUp<GENERIC_AS_SUPER>","user":{"login":"YangZhong","id":3101183,"avatar_url":"https://avatars.githubusercontent.com/u/3101183?v=3","gravatar_id":"","url":"https://api.github.com/users/YangZhong","html_url":"https://github.com/YangZhong","followers_url":"https://api.github.com/users/YangZhong/followers","following_url":"https://api.github.com/users/YangZhong/following{/other_user}","gists_url":"https://api.github.com/users/YangZhong/gists{/gist_id}","starred_url":"https://api.github.com/users/YangZhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YangZhong/subscriptions","organizations_url":"https://api.github.com/users/YangZhong/orgs","repos_url":"https://api.github.com/users/YangZhong/repos","events_url":"https://api.github.com/users/YangZhong/events{/privacy}","received_events_url":"https://api.github.com/users/YangZhong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jmockit/jmockit1/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"rliesenfeld","id":200378,"avatar_url":"https://avatars.githubusercontent.com/u/200378?v=3","gravatar_id":"","url":"https://api.github.com/users/rliesenfeld","html_url":"https://github.com/rliesenfeld","followers_url":"https://api.github.com/users/rliesenfeld/followers","following_url":"https://api.github.com/users/rliesenfeld/following{/other_user}","gists_url":"https://api.github.com/users/rliesenfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/rliesenfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rliesenfeld/subscriptions","organizations_url":"https://api.github.com/users/rliesenfeld/orgs","repos_url":"https://api.github.com/users/rliesenfeld/repos","events_url":"https://api.github.com/users/rliesenfeld/events{/privacy}","received_events_url":"https://api.github.com/users/rliesenfeld/received_events","type":"User","site_admin":false},"assignees":[{"login":"rliesenfeld","id":200378,"avatar_url":"https://avatars.githubusercontent.com/u/200378?v=3","gravatar_id":"","url":"https://api.github.com/users/rliesenfeld","html_url":"https://github.com/rliesenfeld","followers_url":"https://api.github.com/users/rliesenfeld/followers","following_url":"https://api.github.com/users/rliesenfeld/following{/other_user}","gists_url":"https://api.github.com/users/rliesenfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/rliesenfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rliesenfeld/subscriptions","organizations_url":"https://api.github.com/users/rliesenfeld/orgs","repos_url":"https://api.github.com/users/rliesenfeld/repos","events_url":"https://api.github.com/users/rliesenfeld/events{/privacy}","received_events_url":"https://api.github.com/users/rliesenfeld/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-09-28T00:13:40Z","updated_at":"2016-09-28T20:08:58Z","closed_at":null,"body":"Please provide the following information:\r\n\r\n\r\n* Version of JMockit that was used: \r\n1.28 1.27 1.26 1.25\r\nJava \"1.8.0_102\"\r\n\r\n* Description of the problem or enhancement request:\r\n\"java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.GenericArrayTypeImpl cannot be cast to java.lang.Class\" when `MockUp<GENERIC_AS_SUPER>`.\r\nThat's a regression because 1.24 works perfectly.\r\n\r\npublic class GENERIC_AS_SUPER extends `SUPER<GENERIC>`\r\n{...}\r\npublic class TEST extends Assert\r\n{\r\n\r\n> \r\n\r\n    @BeforeClass  //  jUnit 4.12\r\n    static public void SET_UP() throws Exception\r\n    {\r\n        new MockUp<GENERIC_AS_SUPER>()\r\n        {\r\n            @Mock\r\n            void $init()\r\n            {}\r\n            ...\r\n        };\r\n    }\r\n    ...\r\n}"},"comment":{"url":"https://api.github.com/repos/jmockit/jmockit1/issues/comments/250284639","html_url":"https://github.com/jmockit/jmockit1/issues/347#issuecomment-250284639","issue_url":"https://api.github.com/repos/jmockit/jmockit1/issues/347","id":250284639,"user":{"login":"YangZhong","id":3101183,"avatar_url":"https://avatars.githubusercontent.com/u/3101183?v=3","gravatar_id":"","url":"https://api.github.com/users/YangZhong","html_url":"https://github.com/YangZhong","followers_url":"https://api.github.com/users/YangZhong/followers","following_url":"https://api.github.com/users/YangZhong/following{/other_user}","gists_url":"https://api.github.com/users/YangZhong/gists{/gist_id}","starred_url":"https://api.github.com/users/YangZhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YangZhong/subscriptions","organizations_url":"https://api.github.com/users/YangZhong/orgs","repos_url":"https://api.github.com/users/YangZhong/repos","events_url":"https://api.github.com/users/YangZhong/events{/privacy}","received_events_url":"https://api.github.com/users/YangZhong/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T20:08:58Z","updated_at":"2016-09-28T20:08:58Z","body":"Thank *you* Rogério actually.\r\n\r\nJust want to clarify some potential misunderstanding. We do *not* use the full generic type declaration in the `new MockUp<T>()` call. We do `MockUp<GENERIC_AS_SUPER>` as mentioned above. GENERIC_AS_SUPER is our own class we have to mock in only some of our Test Cases.\r\n\r\nAlso as commented above, above Test Case is purposely simplified for regression reproducing & any fix verification. While ourselves do *not* have any Test Case mocking/faking HashMap (yet), we don't choose the sides of HashMap ever needs mocking/faking vs. should never."}}
{"actor":{"display_login":"YangZhong"}}