{"action":"created","comment":{"url":"https://api.github.com/repos/linagora/james-project/pulls/comments/194978161","pull_request_review_id":128252514,"id":194978161,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDk3ODE2MQ==","diff_hunk":"@@ -74,18 +76,44 @@ public void register(MailboxListener listener) {\n \n     @Override\n     public MailboxListener createListener(ListenerConfiguration configuration) {\n-        String listenerClass = configuration.getClazz();\n-        try {\n+        return OptionalUtils\n+            .orSuppliers(\n+                () -> createFromClass(configuration),\n+                () -> createFromFactory(configuration))\n+            .orElseThrow(() -> new RuntimeException(\"unexpected error loading mailbox listener\"));","path":"server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/MailboxListenersLoaderImpl.java","position":26,"original_position":26,"commit_id":"28b32e04551b90fd8050cb4509cef84ad36cc602","original_commit_id":"28b32e04551b90fd8050cb4509cef84ad36cc602","user":{"login":"mbaechler","id":708318,"node_id":"MDQ6VXNlcjcwODMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/708318?v=4","gravatar_id":"","url":"https://api.github.com/users/mbaechler","html_url":"https://github.com/mbaechler","followers_url":"https://api.github.com/users/mbaechler/followers","following_url":"https://api.github.com/users/mbaechler/following{/other_user}","gists_url":"https://api.github.com/users/mbaechler/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaechler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaechler/subscriptions","organizations_url":"https://api.github.com/users/mbaechler/orgs","repos_url":"https://api.github.com/users/mbaechler/repos","events_url":"https://api.github.com/users/mbaechler/events{/privacy}","received_events_url":"https://api.github.com/users/mbaechler/received_events","type":"User","site_admin":false},"body":"No, this case is handled in ListenerConfiguration. This error is for the case where ListenerConfiguration and this class diverge with time","created_at":"2018-06-13T07:20:55Z","updated_at":"2018-06-13T07:22:55Z","html_url":"https://github.com/linagora/james-project/pull/1477#discussion_r194978161","pull_request_url":"https://api.github.com/repos/linagora/james-project/pulls/1477","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/linagora/james-project/pulls/comments/194978161"},"html":{"href":"https://github.com/linagora/james-project/pull/1477#discussion_r194978161"},"pull_request":{"href":"https://api.github.com/repos/linagora/james-project/pulls/1477"}},"in_reply_to_id":194967038},"pull_request":{"url":"https://api.github.com/repos/linagora/james-project/pulls/1477","id":194233653,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MjMzNjUz","html_url":"https://github.com/linagora/james-project/pull/1477","diff_url":"https://github.com/linagora/james-project/pull/1477.diff","patch_url":"https://github.com/linagora/james-project/pull/1477.patch","issue_url":"https://api.github.com/repos/linagora/james-project/issues/1477","number":1477,"state":"open","locked":false,"title":"James 2414 : implement Configurable Listener","user":{"login":"mbaechler","id":708318,"node_id":"MDQ6VXNlcjcwODMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/708318?v=4","gravatar_id":"","url":"https://api.github.com/users/mbaechler","html_url":"https://github.com/mbaechler","followers_url":"https://api.github.com/users/mbaechler/followers","following_url":"https://api.github.com/users/mbaechler/following{/other_user}","gists_url":"https://api.github.com/users/mbaechler/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaechler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaechler/subscriptions","organizations_url":"https://api.github.com/users/mbaechler/orgs","repos_url":"https://api.github.com/users/mbaechler/repos","events_url":"https://api.github.com/users/mbaechler/events{/privacy}","received_events_url":"https://api.github.com/users/mbaechler/received_events","type":"User","site_admin":false},"body":"This is an alternative implementation of Configuration Listeners.\r\nDependencies are injected into a Factory.\r\nConfiguration is given as parameters to the Factory.create method.","created_at":"2018-06-12T10:24:18Z","updated_at":"2018-06-13T07:22:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e09657409909ac1788da6db4cfcc61fc65bd1329","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":236896055,"node_id":"MDU6TGFiZWwyMzY4OTYwNTU=","url":"https://api.github.com/repos/linagora/james-project/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":{"url":"https://api.github.com/repos/linagora/james-project/milestones/4","html_url":"https://github.com/linagora/james-project/milestone/4","labels_url":"https://api.github.com/repos/linagora/james-project/milestones/4/labels","id":3401301,"node_id":"MDk6TWlsZXN0b25lMzQwMTMwMQ==","number":4,"title":"Sprint38","description":"","creator":{"login":"chibenwa","id":6928740,"node_id":"MDQ6VXNlcjY5Mjg3NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/6928740?v=4","gravatar_id":"","url":"https://api.github.com/users/chibenwa","html_url":"https://github.com/chibenwa","followers_url":"https://api.github.com/users/chibenwa/followers","following_url":"https://api.github.com/users/chibenwa/following{/other_user}","gists_url":"https://api.github.com/users/chibenwa/gists{/gist_id}","starred_url":"https://api.github.com/users/chibenwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chibenwa/subscriptions","organizations_url":"https://api.github.com/users/chibenwa/orgs","repos_url":"https://api.github.com/users/chibenwa/repos","events_url":"https://api.github.com/users/chibenwa/events{/privacy}","received_events_url":"https://api.github.com/users/chibenwa/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":18,"state":"open","created_at":"2018-06-05T07:49:07Z","updated_at":"2018-06-13T04:31:51Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/linagora/james-project/pulls/1477/commits","review_comments_url":"https://api.github.com/repos/linagora/james-project/pulls/1477/comments","review_comment_url":"https://api.github.com/repos/linagora/james-project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linagora/james-project/issues/1477/comments","statuses_url":"https://api.github.com/repos/linagora/james-project/statuses/28b32e04551b90fd8050cb4509cef84ad36cc602","head":{"label":"mbaechler:JAMES-2414","ref":"JAMES-2414","sha":"28b32e04551b90fd8050cb4509cef84ad36cc602","user":{"login":"mbaechler","id":708318,"node_id":"MDQ6VXNlcjcwODMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/708318?v=4","gravatar_id":"","url":"https://api.github.com/users/mbaechler","html_url":"https://github.com/mbaechler","followers_url":"https://api.github.com/users/mbaechler/followers","following_url":"https://api.github.com/users/mbaechler/following{/other_user}","gists_url":"https://api.github.com/users/mbaechler/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaechler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaechler/subscriptions","organizations_url":"https://api.github.com/users/mbaechler/orgs","repos_url":"https://api.github.com/users/mbaechler/repos","events_url":"https://api.github.com/users/mbaechler/events{/privacy}","received_events_url":"https://api.github.com/users/mbaechler/received_events","type":"User","site_admin":false},"repo":{"id":39567902,"node_id":"MDEwOlJlcG9zaXRvcnkzOTU2NzkwMg==","name":"james-project","full_name":"mbaechler/james-project","owner":{"login":"mbaechler","id":708318,"node_id":"MDQ6VXNlcjcwODMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/708318?v=4","gravatar_id":"","url":"https://api.github.com/users/mbaechler","html_url":"https://github.com/mbaechler","followers_url":"https://api.github.com/users/mbaechler/followers","following_url":"https://api.github.com/users/mbaechler/following{/other_user}","gists_url":"https://api.github.com/users/mbaechler/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaechler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaechler/subscriptions","organizations_url":"https://api.github.com/users/mbaechler/orgs","repos_url":"https://api.github.com/users/mbaechler/repos","events_url":"https://api.github.com/users/mbaechler/events{/privacy}","received_events_url":"https://api.github.com/users/mbaechler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbaechler/james-project","description":"Mirror of Apache James Project","fork":true,"url":"https://api.github.com/repos/mbaechler/james-project","forks_url":"https://api.github.com/repos/mbaechler/james-project/forks","keys_url":"https://api.github.com/repos/mbaechler/james-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbaechler/james-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbaechler/james-project/teams","hooks_url":"https://api.github.com/repos/mbaechler/james-project/hooks","issue_events_url":"https://api.github.com/repos/mbaechler/james-project/issues/events{/number}","events_url":"https://api.github.com/repos/mbaechler/james-project/events","assignees_url":"https://api.github.com/repos/mbaechler/james-project/assignees{/user}","branches_url":"https://api.github.com/repos/mbaechler/james-project/branches{/branch}","tags_url":"https://api.github.com/repos/mbaechler/james-project/tags","blobs_url":"https://api.github.com/repos/mbaechler/james-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbaechler/james-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbaechler/james-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbaechler/james-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbaechler/james-project/statuses/{sha}","languages_url":"https://api.github.com/repos/mbaechler/james-project/languages","stargazers_url":"https://api.github.com/repos/mbaechler/james-project/stargazers","contributors_url":"https://api.github.com/repos/mbaechler/james-project/contributors","subscribers_url":"https://api.github.com/repos/mbaechler/james-project/subscribers","subscription_url":"https://api.github.com/repos/mbaechler/james-project/subscription","commits_url":"https://api.github.com/repos/mbaechler/james-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbaechler/james-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbaechler/james-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbaechler/james-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbaechler/james-project/contents/{+path}","compare_url":"https://api.github.com/repos/mbaechler/james-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbaechler/james-project/merges","archive_url":"https://api.github.com/repos/mbaechler/james-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbaechler/james-project/downloads","issues_url":"https://api.github.com/repos/mbaechler/james-project/issues{/number}","pulls_url":"https://api.github.com/repos/mbaechler/james-project/pulls{/number}","milestones_url":"https://api.github.com/repos/mbaechler/james-project/milestones{/number}","notifications_url":"https://api.github.com/repos/mbaechler/james-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbaechler/james-project/labels{/name}","releases_url":"https://api.github.com/repos/mbaechler/james-project/releases{/id}","deployments_url":"https://api.github.com/repos/mbaechler/james-project/deployments","created_at":"2015-07-23T13:06:08Z","updated_at":"2017-10-05T13:10:33Z","pushed_at":"2018-06-13T06:16:12Z","git_url":"git://github.com/mbaechler/james-project.git","ssh_url":"git@github.com:mbaechler/james-project.git","clone_url":"https://github.com/mbaechler/james-project.git","svn_url":"https://github.com/mbaechler/james-project","homepage":null,"size":35161,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"linagora:master","ref":"master","sha":"257eae573ca0bd80fca7580c63abb3c6b506091a","user":{"login":"linagora","id":1230365,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMzAzNjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1230365?v=4","gravatar_id":"","url":"https://api.github.com/users/linagora","html_url":"https://github.com/linagora","followers_url":"https://api.github.com/users/linagora/followers","following_url":"https://api.github.com/users/linagora/following{/other_user}","gists_url":"https://api.github.com/users/linagora/gists{/gist_id}","starred_url":"https://api.github.com/users/linagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linagora/subscriptions","organizations_url":"https://api.github.com/users/linagora/orgs","repos_url":"https://api.github.com/users/linagora/repos","events_url":"https://api.github.com/users/linagora/events{/privacy}","received_events_url":"https://api.github.com/users/linagora/received_events","type":"Organization","site_admin":false},"repo":{"id":39182136,"node_id":"MDEwOlJlcG9zaXRvcnkzOTE4MjEzNg==","name":"james-project","full_name":"linagora/james-project","owner":{"login":"linagora","id":1230365,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMzAzNjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1230365?v=4","gravatar_id":"","url":"https://api.github.com/users/linagora","html_url":"https://github.com/linagora","followers_url":"https://api.github.com/users/linagora/followers","following_url":"https://api.github.com/users/linagora/following{/other_user}","gists_url":"https://api.github.com/users/linagora/gists{/gist_id}","starred_url":"https://api.github.com/users/linagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linagora/subscriptions","organizations_url":"https://api.github.com/users/linagora/orgs","repos_url":"https://api.github.com/users/linagora/repos","events_url":"https://api.github.com/users/linagora/events{/privacy}","received_events_url":"https://api.github.com/users/linagora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linagora/james-project","description":"Mirror of Apache James Project","fork":true,"url":"https://api.github.com/repos/linagora/james-project","forks_url":"https://api.github.com/repos/linagora/james-project/forks","keys_url":"https://api.github.com/repos/linagora/james-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linagora/james-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linagora/james-project/teams","hooks_url":"https://api.github.com/repos/linagora/james-project/hooks","issue_events_url":"https://api.github.com/repos/linagora/james-project/issues/events{/number}","events_url":"https://api.github.com/repos/linagora/james-project/events","assignees_url":"https://api.github.com/repos/linagora/james-project/assignees{/user}","branches_url":"https://api.github.com/repos/linagora/james-project/branches{/branch}","tags_url":"https://api.github.com/repos/linagora/james-project/tags","blobs_url":"https://api.github.com/repos/linagora/james-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linagora/james-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linagora/james-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/linagora/james-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linagora/james-project/statuses/{sha}","languages_url":"https://api.github.com/repos/linagora/james-project/languages","stargazers_url":"https://api.github.com/repos/linagora/james-project/stargazers","contributors_url":"https://api.github.com/repos/linagora/james-project/contributors","subscribers_url":"https://api.github.com/repos/linagora/james-project/subscribers","subscription_url":"https://api.github.com/repos/linagora/james-project/subscription","commits_url":"https://api.github.com/repos/linagora/james-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/linagora/james-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/linagora/james-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/linagora/james-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/linagora/james-project/contents/{+path}","compare_url":"https://api.github.com/repos/linagora/james-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linagora/james-project/merges","archive_url":"https://api.github.com/repos/linagora/james-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linagora/james-project/downloads","issues_url":"https://api.github.com/repos/linagora/james-project/issues{/number}","pulls_url":"https://api.github.com/repos/linagora/james-project/pulls{/number}","milestones_url":"https://api.github.com/repos/linagora/james-project/milestones{/number}","notifications_url":"https://api.github.com/repos/linagora/james-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linagora/james-project/labels{/name}","releases_url":"https://api.github.com/repos/linagora/james-project/releases{/id}","deployments_url":"https://api.github.com/repos/linagora/james-project/deployments","created_at":"2015-07-16T07:04:59Z","updated_at":"2018-06-13T02:49:38Z","pushed_at":"2018-06-13T07:12:31Z","git_url":"git://github.com/linagora/james-project.git","ssh_url":"git@github.com:linagora/james-project.git","clone_url":"https://github.com/linagora/james-project.git","svn_url":"https://github.com/linagora/james-project","homepage":null,"size":33502,"stargazers_count":21,"watchers_count":21,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":68,"license":null,"forks":25,"open_issues":68,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linagora/james-project/pulls/1477"},"html":{"href":"https://github.com/linagora/james-project/pull/1477"},"issue":{"href":"https://api.github.com/repos/linagora/james-project/issues/1477"},"comments":{"href":"https://api.github.com/repos/linagora/james-project/issues/1477/comments"},"review_comments":{"href":"https://api.github.com/repos/linagora/james-project/pulls/1477/comments"},"review_comment":{"href":"https://api.github.com/repos/linagora/james-project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linagora/james-project/pulls/1477/commits"},"statuses":{"href":"https://api.github.com/repos/linagora/james-project/statuses/28b32e04551b90fd8050cb4509cef84ad36cc602"}},"author_association":"NONE"}}
{"actor":{"display_login":"mbaechler"}}