{"action":"created","comment":{"url":"https://api.github.com/repos/junit-team/junit5/pulls/comments/64633990","id":64633990,"diff_hunk":"@@ -73,18 +73,21 @@ public Object invoke(MethodInvocationContext methodInvocationContext) {\n \tprivate Object resolveParameter(Parameter parameter, MethodInvocationContext methodInvocationContext)\n \t\t\tthrows ParameterResolutionException {\n \n-\t\tMethod method = methodInvocationContext.getMethod();\n+\t\tfinal Method method = methodInvocationContext.getMethod();\n+\t\tfinal Optional<Object> target = Optional.ofNullable(methodInvocationContext.getInstance());\n \n \t\ttry {\n \t\t\t// @formatter:off\n-\t\t\tList<MethodParameterResolver> matchingResolvers = this.extensionRegistry.stream(MethodParameterResolver.class)\n-\t\t\t\t\t.filter(resolver -> resolver.supports(parameter, methodInvocationContext, this.extensionContext))\n+\t\t\tList<ParameterResolver> matchingResolvers = this.extensionRegistry.stream(ParameterResolver.class)\n+\t\t\t\t\t.filter(resolver -> {\n+\t\t\t\t\t\treturn resolver.supports(parameter, target, this.extensionContext);\n+\t\t\t\t\t})","path":"junit5-engine/src/main/java/org/junit/gen5/engine/junit5/execution/MethodInvoker.java","position":39,"original_position":39,"commit_id":"04c0d5f654afa628a089a38a8b45e259c18b0e72","original_commit_id":"04c0d5f654afa628a089a38a8b45e259c18b0e72","user":{"login":"sbrannen","id":104798,"avatar_url":"https://avatars.githubusercontent.com/u/104798?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"body":"Ummmm.... I don't recall having done that.\r\n\r\nStrange. I'll change it back.","created_at":"2016-05-25T19:08:04Z","updated_at":"2016-05-25T19:08:04Z","html_url":"https://github.com/junit-team/junit5/pull/283#discussion_r64633990","pull_request_url":"https://api.github.com/repos/junit-team/junit5/pulls/283","_links":{"self":{"href":"https://api.github.com/repos/junit-team/junit5/pulls/comments/64633990"},"html":{"href":"https://github.com/junit-team/junit5/pull/283#discussion_r64633990"},"pull_request":{"href":"https://api.github.com/repos/junit-team/junit5/pulls/283"}}},"pull_request":{"url":"https://api.github.com/repos/junit-team/junit5/pulls/283","id":71403798,"html_url":"https://github.com/junit-team/junit5/pull/283","diff_url":"https://github.com/junit-team/junit5/pull/283.diff","patch_url":"https://github.com/junit-team/junit5/pull/283.patch","issue_url":"https://api.github.com/repos/junit-team/junit5/issues/283","number":283,"state":"open","locked":false,"title":"Convert MethodParameterResolver to generic ParameterResolver API","user":{"login":"sbrannen","id":104798,"avatar_url":"https://avatars.githubusercontent.com/u/104798?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"body":"Prior to this commit, the `MethodParameterResolver` API could only be applied to methods. In addition, the `MethodInvocationContext` API needlessly stored the method which could be retrieved directly from the supplied `Parameter`.\r\n\r\nThis commit addresses these issues by converting the `MethodParameterResolver` into a generic `ParameterResolver` API that can be used to resolve parameters for both methods and constructors. At the moment, however, there is no first-class support for resolving constructor parameters in the `JUnit5TestEngine`.\r\n\r\nSpecifically, this commit includes the following changes.\r\n\r\n- Renamed `MethodParameterResolver` to `ParameterResolver`\r\n- Replaced `MethodInvocationContext` arguments in `ParameterResolver` with `Optional<Object>` for the target of method invocations\r\n- Moved `MethodInvocationContext` to the `junit5-engine` module for internal use\r\n\r\nIssue: #267\r\n\r\n---\r\n\r\nI hereby agree to the terms of the JUnit Contributor License Agreement.","created_at":"2016-05-25T14:41:37Z","updated_at":"2016-05-25T19:08:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9962aac2f564d26cb82a7e63038e7cd33bb7c002","assignee":{"login":"sbrannen","id":104798,"avatar_url":"https://avatars.githubusercontent.com/u/104798?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/junit-team/junit5/milestones/2","html_url":"https://github.com/junit-team/junit5/milestones/5.0%20M1","labels_url":"https://api.github.com/repos/junit-team/junit5/milestones/2/labels","id":1455861,"number":2,"title":"5.0 M1","description":"First major milestone release for JUnit 5 after the Alpha release\r\n\r\n**Epics:**\r\n\r\n- Stable, documented IDE-facing APIs (Launcher and Engine API)\r\n- Dynamic tests\r\n","creator":{"login":"sbrannen","id":104798,"avatar_url":"https://avatars.githubusercontent.com/u/104798?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":83,"state":"open","created_at":"2015-12-11T12:28:52Z","updated_at":"2016-05-25T18:19:43Z","due_on":"2016-05-30T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/junit-team/junit5/pulls/283/commits","review_comments_url":"https://api.github.com/repos/junit-team/junit5/pulls/283/comments","review_comment_url":"https://api.github.com/repos/junit-team/junit5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/junit-team/junit5/issues/283/comments","statuses_url":"https://api.github.com/repos/junit-team/junit5/statuses/04c0d5f654afa628a089a38a8b45e259c18b0e72","head":{"label":"junit-team:issues/267-generic-parameter-resolver","ref":"issues/267-generic-parameter-resolver","sha":"04c0d5f654afa628a089a38a8b45e259c18b0e72","user":{"login":"junit-team","id":874086,"avatar_url":"https://avatars.githubusercontent.com/u/874086?v=3","gravatar_id":"","url":"https://api.github.com/users/junit-team","html_url":"https://github.com/junit-team","followers_url":"https://api.github.com/users/junit-team/followers","following_url":"https://api.github.com/users/junit-team/following{/other_user}","gists_url":"https://api.github.com/users/junit-team/gists{/gist_id}","starred_url":"https://api.github.com/users/junit-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junit-team/subscriptions","organizations_url":"https://api.github.com/users/junit-team/orgs","repos_url":"https://api.github.com/users/junit-team/repos","events_url":"https://api.github.com/users/junit-team/events{/privacy}","received_events_url":"https://api.github.com/users/junit-team/received_events","type":"Organization","site_admin":false},"repo":{"id":29102367,"name":"junit5","full_name":"junit-team/junit5","owner":{"login":"junit-team","id":874086,"avatar_url":"https://avatars.githubusercontent.com/u/874086?v=3","gravatar_id":"","url":"https://api.github.com/users/junit-team","html_url":"https://github.com/junit-team","followers_url":"https://api.github.com/users/junit-team/followers","following_url":"https://api.github.com/users/junit-team/following{/other_user}","gists_url":"https://api.github.com/users/junit-team/gists{/gist_id}","starred_url":"https://api.github.com/users/junit-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junit-team/subscriptions","organizations_url":"https://api.github.com/users/junit-team/orgs","repos_url":"https://api.github.com/users/junit-team/repos","events_url":"https://api.github.com/users/junit-team/events{/privacy}","received_events_url":"https://api.github.com/users/junit-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/junit-team/junit5","description":"The next generation of JUnit.","fork":false,"url":"https://api.github.com/repos/junit-team/junit5","forks_url":"https://api.github.com/repos/junit-team/junit5/forks","keys_url":"https://api.github.com/repos/junit-team/junit5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/junit-team/junit5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/junit-team/junit5/teams","hooks_url":"https://api.github.com/repos/junit-team/junit5/hooks","issue_events_url":"https://api.github.com/repos/junit-team/junit5/issues/events{/number}","events_url":"https://api.github.com/repos/junit-team/junit5/events","assignees_url":"https://api.github.com/repos/junit-team/junit5/assignees{/user}","branches_url":"https://api.github.com/repos/junit-team/junit5/branches{/branch}","tags_url":"https://api.github.com/repos/junit-team/junit5/tags","blobs_url":"https://api.github.com/repos/junit-team/junit5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/junit-team/junit5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/junit-team/junit5/git/refs{/sha}","trees_url":"https://api.github.com/repos/junit-team/junit5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/junit-team/junit5/statuses/{sha}","languages_url":"https://api.github.com/repos/junit-team/junit5/languages","stargazers_url":"https://api.github.com/repos/junit-team/junit5/stargazers","contributors_url":"https://api.github.com/repos/junit-team/junit5/contributors","subscribers_url":"https://api.github.com/repos/junit-team/junit5/subscribers","subscription_url":"https://api.github.com/repos/junit-team/junit5/subscription","commits_url":"https://api.github.com/repos/junit-team/junit5/commits{/sha}","git_commits_url":"https://api.github.com/repos/junit-team/junit5/git/commits{/sha}","comments_url":"https://api.github.com/repos/junit-team/junit5/comments{/number}","issue_comment_url":"https://api.github.com/repos/junit-team/junit5/issues/comments{/number}","contents_url":"https://api.github.com/repos/junit-team/junit5/contents/{+path}","compare_url":"https://api.github.com/repos/junit-team/junit5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/junit-team/junit5/merges","archive_url":"https://api.github.com/repos/junit-team/junit5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/junit-team/junit5/downloads","issues_url":"https://api.github.com/repos/junit-team/junit5/issues{/number}","pulls_url":"https://api.github.com/repos/junit-team/junit5/pulls{/number}","milestones_url":"https://api.github.com/repos/junit-team/junit5/milestones{/number}","notifications_url":"https://api.github.com/repos/junit-team/junit5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/junit-team/junit5/labels{/name}","releases_url":"https://api.github.com/repos/junit-team/junit5/releases{/id}","deployments_url":"https://api.github.com/repos/junit-team/junit5/deployments","created_at":"2015-01-11T19:06:10Z","updated_at":"2016-05-24T12:53:18Z","pushed_at":"2016-05-25T17:57:17Z","git_url":"git://github.com/junit-team/junit5.git","ssh_url":"git@github.com:junit-team/junit5.git","clone_url":"https://github.com/junit-team/junit5.git","svn_url":"https://github.com/junit-team/junit5","homepage":"http://junit.org/junit5/","size":5856,"stargazers_count":434,"watchers_count":434,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":84,"mirror_url":null,"open_issues_count":51,"forks":84,"open_issues":51,"watchers":434,"default_branch":"master"}},"base":{"label":"junit-team:master","ref":"master","sha":"c4888699cb978a29ee5c7ece5f8866bafbefca22","user":{"login":"junit-team","id":874086,"avatar_url":"https://avatars.githubusercontent.com/u/874086?v=3","gravatar_id":"","url":"https://api.github.com/users/junit-team","html_url":"https://github.com/junit-team","followers_url":"https://api.github.com/users/junit-team/followers","following_url":"https://api.github.com/users/junit-team/following{/other_user}","gists_url":"https://api.github.com/users/junit-team/gists{/gist_id}","starred_url":"https://api.github.com/users/junit-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junit-team/subscriptions","organizations_url":"https://api.github.com/users/junit-team/orgs","repos_url":"https://api.github.com/users/junit-team/repos","events_url":"https://api.github.com/users/junit-team/events{/privacy}","received_events_url":"https://api.github.com/users/junit-team/received_events","type":"Organization","site_admin":false},"repo":{"id":29102367,"name":"junit5","full_name":"junit-team/junit5","owner":{"login":"junit-team","id":874086,"avatar_url":"https://avatars.githubusercontent.com/u/874086?v=3","gravatar_id":"","url":"https://api.github.com/users/junit-team","html_url":"https://github.com/junit-team","followers_url":"https://api.github.com/users/junit-team/followers","following_url":"https://api.github.com/users/junit-team/following{/other_user}","gists_url":"https://api.github.com/users/junit-team/gists{/gist_id}","starred_url":"https://api.github.com/users/junit-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junit-team/subscriptions","organizations_url":"https://api.github.com/users/junit-team/orgs","repos_url":"https://api.github.com/users/junit-team/repos","events_url":"https://api.github.com/users/junit-team/events{/privacy}","received_events_url":"https://api.github.com/users/junit-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/junit-team/junit5","description":"The next generation of JUnit.","fork":false,"url":"https://api.github.com/repos/junit-team/junit5","forks_url":"https://api.github.com/repos/junit-team/junit5/forks","keys_url":"https://api.github.com/repos/junit-team/junit5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/junit-team/junit5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/junit-team/junit5/teams","hooks_url":"https://api.github.com/repos/junit-team/junit5/hooks","issue_events_url":"https://api.github.com/repos/junit-team/junit5/issues/events{/number}","events_url":"https://api.github.com/repos/junit-team/junit5/events","assignees_url":"https://api.github.com/repos/junit-team/junit5/assignees{/user}","branches_url":"https://api.github.com/repos/junit-team/junit5/branches{/branch}","tags_url":"https://api.github.com/repos/junit-team/junit5/tags","blobs_url":"https://api.github.com/repos/junit-team/junit5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/junit-team/junit5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/junit-team/junit5/git/refs{/sha}","trees_url":"https://api.github.com/repos/junit-team/junit5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/junit-team/junit5/statuses/{sha}","languages_url":"https://api.github.com/repos/junit-team/junit5/languages","stargazers_url":"https://api.github.com/repos/junit-team/junit5/stargazers","contributors_url":"https://api.github.com/repos/junit-team/junit5/contributors","subscribers_url":"https://api.github.com/repos/junit-team/junit5/subscribers","subscription_url":"https://api.github.com/repos/junit-team/junit5/subscription","commits_url":"https://api.github.com/repos/junit-team/junit5/commits{/sha}","git_commits_url":"https://api.github.com/repos/junit-team/junit5/git/commits{/sha}","comments_url":"https://api.github.com/repos/junit-team/junit5/comments{/number}","issue_comment_url":"https://api.github.com/repos/junit-team/junit5/issues/comments{/number}","contents_url":"https://api.github.com/repos/junit-team/junit5/contents/{+path}","compare_url":"https://api.github.com/repos/junit-team/junit5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/junit-team/junit5/merges","archive_url":"https://api.github.com/repos/junit-team/junit5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/junit-team/junit5/downloads","issues_url":"https://api.github.com/repos/junit-team/junit5/issues{/number}","pulls_url":"https://api.github.com/repos/junit-team/junit5/pulls{/number}","milestones_url":"https://api.github.com/repos/junit-team/junit5/milestones{/number}","notifications_url":"https://api.github.com/repos/junit-team/junit5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/junit-team/junit5/labels{/name}","releases_url":"https://api.github.com/repos/junit-team/junit5/releases{/id}","deployments_url":"https://api.github.com/repos/junit-team/junit5/deployments","created_at":"2015-01-11T19:06:10Z","updated_at":"2016-05-24T12:53:18Z","pushed_at":"2016-05-25T17:57:17Z","git_url":"git://github.com/junit-team/junit5.git","ssh_url":"git@github.com:junit-team/junit5.git","clone_url":"https://github.com/junit-team/junit5.git","svn_url":"https://github.com/junit-team/junit5","homepage":"http://junit.org/junit5/","size":5856,"stargazers_count":434,"watchers_count":434,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":84,"mirror_url":null,"open_issues_count":51,"forks":84,"open_issues":51,"watchers":434,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/junit-team/junit5/pulls/283"},"html":{"href":"https://github.com/junit-team/junit5/pull/283"},"issue":{"href":"https://api.github.com/repos/junit-team/junit5/issues/283"},"comments":{"href":"https://api.github.com/repos/junit-team/junit5/issues/283/comments"},"review_comments":{"href":"https://api.github.com/repos/junit-team/junit5/pulls/283/comments"},"review_comment":{"href":"https://api.github.com/repos/junit-team/junit5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/junit-team/junit5/pulls/283/commits"},"statuses":{"href":"https://api.github.com/repos/junit-team/junit5/statuses/04c0d5f654afa628a089a38a8b45e259c18b0e72"}}}}
{"actor":{"display_login":"sbrannen"}}