{"action":"created","comment":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/58210147","id":58210147,"diff_hunk":"@@ -55,29 +45,22 @@ public void register(final Object handlerInstance) {\n      * Registers handler instance and method.\n      *\n      * @param handler handler instance to register.\n-     * @param method handler method to register.\n+     * @param method  handler method to register.\n      */\n     private void register(final Object handler, final Method method) {\n \n-        if (Void.TYPE.equals(method.getReturnType())) {\n-            put(handler, method, AsynchronousHandlerMethod::new, asynchronousMethods);\n-        } else {\n-            put(handler, method, SynchronousHandlerMethod::new, synchronousMethods);\n-        }\n-    }\n-\n-    private <T extends HandlerMethod> void put(final Object handler,\n-                                               final Method method,\n-                                               final BiFunction<Object, Method, T> constructor,\n-                                               final Map<String, T> map) {\n-\n-        T handlerMethod = constructor.apply(handler, method);\n+        HandlerMethod handlerMethod = new HandlerMethod(handler, method, method.getReturnType());","path":"core/src/main/java/uk/gov/justice/services/core/handler/registry/HandlerRegistry.java","position":80,"original_position":80,"commit_id":"91aa5963d64f359b0b9fa4abf4528e9a35248d5c","original_commit_id":"91aa5963d64f359b0b9fa4abf4528e9a35248d5c","user":{"login":"matt-rich","id":17124628,"avatar_url":"https://avatars.githubusercontent.com/u/17124628?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-rich","html_url":"https://github.com/matt-rich","followers_url":"https://api.github.com/users/matt-rich/followers","following_url":"https://api.github.com/users/matt-rich/following{/other_user}","gists_url":"https://api.github.com/users/matt-rich/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-rich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-rich/subscriptions","organizations_url":"https://api.github.com/users/matt-rich/orgs","repos_url":"https://api.github.com/users/matt-rich/repos","events_url":"https://api.github.com/users/matt-rich/events{/privacy}","received_events_url":"https://api.github.com/users/matt-rich/received_events","type":"User","site_admin":false},"body":"should these 2 local variables be final as there is no intent to update them","created_at":"2016-04-01T14:07:05Z","updated_at":"2016-04-01T14:07:05Z","html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/29#discussion_r58210147","pull_request_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/58210147"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/29#discussion_r58210147"},"pull_request":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29","id":64946594,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/29","diff_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/29.diff","patch_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/29.patch","issue_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/29","number":29,"state":"open","locked":false,"title":"Simplify dispatching of sync/async handlers","user":{"login":"purple52","id":1073363,"avatar_url":"https://avatars.githubusercontent.com/u/1073363?v=3","gravatar_id":"","url":"https://api.github.com/users/purple52","html_url":"https://github.com/purple52","followers_url":"https://api.github.com/users/purple52/followers","following_url":"https://api.github.com/users/purple52/following{/other_user}","gists_url":"https://api.github.com/users/purple52/gists{/gist_id}","starred_url":"https://api.github.com/users/purple52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purple52/subscriptions","organizations_url":"https://api.github.com/users/purple52/orgs","repos_url":"https://api.github.com/users/purple52/repos","events_url":"https://api.github.com/users/purple52/events{/privacy}","received_events_url":"https://api.github.com/users/purple52/received_events","type":"User","site_admin":false},"body":"Model asynchronous handler methods as returning Void to reduce the complexity of the handler registry.","created_at":"2016-04-01T13:45:34Z","updated_at":"2016-04-01T14:07:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67ea1d3d30f31f7e397e6c31b35da1a7a6077f19","assignee":{"login":"matt-rich","id":17124628,"avatar_url":"https://avatars.githubusercontent.com/u/17124628?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-rich","html_url":"https://github.com/matt-rich","followers_url":"https://api.github.com/users/matt-rich/followers","following_url":"https://api.github.com/users/matt-rich/following{/other_user}","gists_url":"https://api.github.com/users/matt-rich/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-rich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-rich/subscriptions","organizations_url":"https://api.github.com/users/matt-rich/orgs","repos_url":"https://api.github.com/users/matt-rich/repos","events_url":"https://api.github.com/users/matt-rich/events{/privacy}","received_events_url":"https://api.github.com/users/matt-rich/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29/commits","review_comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29/comments","review_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/29/comments","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/91aa5963d64f359b0b9fa4abf4528e9a35248d5c","head":{"label":"CJSCommonPlatform:refactor-dispatcher","ref":"refactor-dispatcher","sha":"91aa5963d64f359b0b9fa4abf4528e9a35248d5c","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2016-03-08T16:38:42Z","pushed_at":"2016-04-01T14:02:45Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":null,"size":489,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"CJSCommonPlatform:master","ref":"master","sha":"28a0f3d71f98170b1f955b6369cf49938ff3aa27","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2016-03-08T16:38:42Z","pushed_at":"2016-04-01T14:02:45Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":null,"size":489,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/29"},"issue":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/29"},"comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/91aa5963d64f359b0b9fa4abf4528e9a35248d5c"}}}}