{"action":"created","issue":{"url":"https://api.github.com/repos/jmockit/jmockit1/issues/340","repository_url":"https://api.github.com/repos/jmockit/jmockit1","labels_url":"https://api.github.com/repos/jmockit/jmockit1/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/jmockit/jmockit1/issues/340/comments","events_url":"https://api.github.com/repos/jmockit/jmockit1/issues/340/events","html_url":"https://github.com/jmockit/jmockit1/issues/340","id":178595195,"number":340,"title":"false-positive java.lang.IllegalArgumentException: Attempted to record expectation on unmockable method","user":{"login":"Vampire","id":325196,"avatar_url":"https://avatars.githubusercontent.com/u/325196?v=3","gravatar_id":"","url":"https://api.github.com/users/Vampire","html_url":"https://github.com/Vampire","followers_url":"https://api.github.com/users/Vampire/followers","following_url":"https://api.github.com/users/Vampire/following{/other_user}","gists_url":"https://api.github.com/users/Vampire/gists{/gist_id}","starred_url":"https://api.github.com/users/Vampire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vampire/subscriptions","organizations_url":"https://api.github.com/users/Vampire/orgs","repos_url":"https://api.github.com/users/Vampire/repos","events_url":"https://api.github.com/users/Vampire/events{/privacy}","received_events_url":"https://api.github.com/users/Vampire/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jmockit/jmockit1/labels/other","name":"other","color":"000000"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-22T12:21:50Z","updated_at":"2016-09-22T15:43:16Z","closed_at":null,"body":"Having the attached example project [test.zip](https://github.com/jmockit/jmockit1/files/487220/test.zip)  (unzip and run `gradlew test -i`), you get an error `Attempted to record expectation on unmockable method`.\r\n\r\nThe `String` `@Injectable` is necessary to satisfy the `Logger` constructor argument. But as far as I understand the `Injectable` JavaDoc, no other instances of `String` should be affected in any way. Yet this error occurs while actually no expectation for this method is recorded, its return value is just used as argument matcher.\r\n\r\n**Workaround:** Do the `getBytes()` call before the `Expectations` block"},"comment":{"url":"https://api.github.com/repos/jmockit/jmockit1/issues/comments/248942183","html_url":"https://github.com/jmockit/jmockit1/issues/340#issuecomment-248942183","issue_url":"https://api.github.com/repos/jmockit/jmockit1/issues/340","id":248942183,"user":{"login":"Vampire","id":325196,"avatar_url":"https://avatars.githubusercontent.com/u/325196?v=3","gravatar_id":"","url":"https://api.github.com/users/Vampire","html_url":"https://github.com/Vampire","followers_url":"https://api.github.com/users/Vampire/followers","following_url":"https://api.github.com/users/Vampire/following{/other_user}","gists_url":"https://api.github.com/users/Vampire/gists{/gist_id}","starred_url":"https://api.github.com/users/Vampire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vampire/subscriptions","organizations_url":"https://api.github.com/users/Vampire/orgs","repos_url":"https://api.github.com/users/Vampire/repos","events_url":"https://api.github.com/users/Vampire/events{/privacy}","received_events_url":"https://api.github.com/users/Vampire/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T15:43:16Z","updated_at":"2016-09-22T15:43:16Z","body":"If you look at the provided MVCE together with my description, you will see that I do not even try to record an expectation on a String. I just use an unmocked String instance in an expectation as parameter for or as return value for some other expectation."}}
{"actor":{"display_login":"Vampire"}}