{"action":"created","comment":{"url":"https://api.github.com/repos/Karumi/Rosie/pulls/comments/100906075","pull_request_review_id":21622128,"id":100906075,"diff_hunk":"@@ -63,18 +75,21 @@ public void unregisterGlobalErrorCallback(OnErrorCallback globalError) {\n    * Inner class responsible for routing the errors thrown from the use case to the error handler\n    */\n   private static class OnErrorCallbackToErrorHandlerAdapter implements OnErrorCallback {\n-    private final ErrorHandler errorHandler;\n-    private final OnErrorCallback useCaseOnErrorCallback;\n+    private WeakReference<ErrorHandler> errorHandler;","path":"rosie/src/main/java/com/karumi/rosie/domain/usecase/UseCaseHandler.java","position":46,"original_position":46,"commit_id":"9864d7be02577d0e1941a178c2d86b50e5e1483e","original_commit_id":"9864d7be02577d0e1941a178c2d86b50e5e1483e","user":{"login":"flipper83","id":2915842,"avatar_url":"https://avatars.githubusercontent.com/u/2915842?v=3","gravatar_id":"","url":"https://api.github.com/users/flipper83","html_url":"https://github.com/flipper83","followers_url":"https://api.github.com/users/flipper83/followers","following_url":"https://api.github.com/users/flipper83/following{/other_user}","gists_url":"https://api.github.com/users/flipper83/gists{/gist_id}","starred_url":"https://api.github.com/users/flipper83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flipper83/subscriptions","organizations_url":"https://api.github.com/users/flipper83/orgs","repos_url":"https://api.github.com/users/flipper83/repos","events_url":"https://api.github.com/users/flipper83/events{/privacy}","received_events_url":"https://api.github.com/users/flipper83/received_events","type":"User","site_admin":false},"body":"this weakRefrence an the next one could be final (for follow the style rules)","created_at":"2017-02-13T21:43:58Z","updated_at":"2017-02-13T21:44:48Z","html_url":"https://github.com/Karumi/Rosie/pull/84#discussion_r100906075","pull_request_url":"https://api.github.com/repos/Karumi/Rosie/pulls/84","_links":{"self":{"href":"https://api.github.com/repos/Karumi/Rosie/pulls/comments/100906075"},"html":{"href":"https://github.com/Karumi/Rosie/pull/84#discussion_r100906075"},"pull_request":{"href":"https://api.github.com/repos/Karumi/Rosie/pulls/84"}}},"pull_request":{"url":"https://api.github.com/repos/Karumi/Rosie/pulls/84","id":105262034,"html_url":"https://github.com/Karumi/Rosie/pull/84","diff_url":"https://github.com/Karumi/Rosie/pull/84.diff","patch_url":"https://github.com/Karumi/Rosie/pull/84.patch","issue_url":"https://api.github.com/repos/Karumi/Rosie/issues/84","number":84,"state":"open","locked":false,"title":"New list in UseCaseHandler to retain error adapters in a non-weak reference","user":{"login":"jcdom","id":8142789,"avatar_url":"https://avatars.githubusercontent.com/u/8142789?v=3","gravatar_id":"","url":"https://api.github.com/users/jcdom","html_url":"https://github.com/jcdom","followers_url":"https://api.github.com/users/jcdom/followers","following_url":"https://api.github.com/users/jcdom/following{/other_user}","gists_url":"https://api.github.com/users/jcdom/gists{/gist_id}","starred_url":"https://api.github.com/users/jcdom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcdom/subscriptions","organizations_url":"https://api.github.com/users/jcdom/orgs","repos_url":"https://api.github.com/users/jcdom/repos","events_url":"https://api.github.com/users/jcdom/events{/privacy}","received_events_url":"https://api.github.com/users/jcdom/received_events","type":"User","site_admin":false},"body":"* This change solves a NullPointerException in RosieUseCase.notifyError that was happening when the error adapter was cleared of memory, because the adapter was only saved in a WeakReference in RosieUseCase\r\n* Also, I am modifying OnErrorCallbackToErrorHandlerAdapter to save the constructor parameters in weak references\r\n* I am using Rosie in an app available in Google Play, everything is working fine except for a few crashes caused by this error. I have solved this issue temporally replacing UseCaseHandler with my own class with these changes.\r\n\r\nThanks for this amazing framework","created_at":"2017-02-08T17:14:22Z","updated_at":"2017-02-13T21:44:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24b3555dfb9aced42710a82890f6a9ef8ce6754c","assignee":{"login":"flipper83","id":2915842,"avatar_url":"https://avatars.githubusercontent.com/u/2915842?v=3","gravatar_id":"","url":"https://api.github.com/users/flipper83","html_url":"https://github.com/flipper83","followers_url":"https://api.github.com/users/flipper83/followers","following_url":"https://api.github.com/users/flipper83/following{/other_user}","gists_url":"https://api.github.com/users/flipper83/gists{/gist_id}","starred_url":"https://api.github.com/users/flipper83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flipper83/subscriptions","organizations_url":"https://api.github.com/users/flipper83/orgs","repos_url":"https://api.github.com/users/flipper83/repos","events_url":"https://api.github.com/users/flipper83/events{/privacy}","received_events_url":"https://api.github.com/users/flipper83/received_events","type":"User","site_admin":false},"assignees":[{"login":"flipper83","id":2915842,"avatar_url":"https://avatars.githubusercontent.com/u/2915842?v=3","gravatar_id":"","url":"https://api.github.com/users/flipper83","html_url":"https://github.com/flipper83","followers_url":"https://api.github.com/users/flipper83/followers","following_url":"https://api.github.com/users/flipper83/following{/other_user}","gists_url":"https://api.github.com/users/flipper83/gists{/gist_id}","starred_url":"https://api.github.com/users/flipper83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flipper83/subscriptions","organizations_url":"https://api.github.com/users/flipper83/orgs","repos_url":"https://api.github.com/users/flipper83/repos","events_url":"https://api.github.com/users/flipper83/events{/privacy}","received_events_url":"https://api.github.com/users/flipper83/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Karumi/Rosie/pulls/84/commits","review_comments_url":"https://api.github.com/repos/Karumi/Rosie/pulls/84/comments","review_comment_url":"https://api.github.com/repos/Karumi/Rosie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Karumi/Rosie/issues/84/comments","statuses_url":"https://api.github.com/repos/Karumi/Rosie/statuses/9864d7be02577d0e1941a178c2d86b50e5e1483e","head":{"label":"jcdom:use_case_handler","ref":"use_case_handler","sha":"9864d7be02577d0e1941a178c2d86b50e5e1483e","user":{"login":"jcdom","id":8142789,"avatar_url":"https://avatars.githubusercontent.com/u/8142789?v=3","gravatar_id":"","url":"https://api.github.com/users/jcdom","html_url":"https://github.com/jcdom","followers_url":"https://api.github.com/users/jcdom/followers","following_url":"https://api.github.com/users/jcdom/following{/other_user}","gists_url":"https://api.github.com/users/jcdom/gists{/gist_id}","starred_url":"https://api.github.com/users/jcdom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcdom/subscriptions","organizations_url":"https://api.github.com/users/jcdom/orgs","repos_url":"https://api.github.com/users/jcdom/repos","events_url":"https://api.github.com/users/jcdom/events{/privacy}","received_events_url":"https://api.github.com/users/jcdom/received_events","type":"User","site_admin":false},"repo":{"id":81328160,"name":"Rosie","full_name":"jcdom/Rosie","owner":{"login":"jcdom","id":8142789,"avatar_url":"https://avatars.githubusercontent.com/u/8142789?v=3","gravatar_id":"","url":"https://api.github.com/users/jcdom","html_url":"https://github.com/jcdom","followers_url":"https://api.github.com/users/jcdom/followers","following_url":"https://api.github.com/users/jcdom/following{/other_user}","gists_url":"https://api.github.com/users/jcdom/gists{/gist_id}","starred_url":"https://api.github.com/users/jcdom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcdom/subscriptions","organizations_url":"https://api.github.com/users/jcdom/orgs","repos_url":"https://api.github.com/users/jcdom/repos","events_url":"https://api.github.com/users/jcdom/events{/privacy}","received_events_url":"https://api.github.com/users/jcdom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcdom/Rosie","description":"Rosie is an Android framework to create applications following the principles of Clean Architecture.","fork":true,"url":"https://api.github.com/repos/jcdom/Rosie","forks_url":"https://api.github.com/repos/jcdom/Rosie/forks","keys_url":"https://api.github.com/repos/jcdom/Rosie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcdom/Rosie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcdom/Rosie/teams","hooks_url":"https://api.github.com/repos/jcdom/Rosie/hooks","issue_events_url":"https://api.github.com/repos/jcdom/Rosie/issues/events{/number}","events_url":"https://api.github.com/repos/jcdom/Rosie/events","assignees_url":"https://api.github.com/repos/jcdom/Rosie/assignees{/user}","branches_url":"https://api.github.com/repos/jcdom/Rosie/branches{/branch}","tags_url":"https://api.github.com/repos/jcdom/Rosie/tags","blobs_url":"https://api.github.com/repos/jcdom/Rosie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcdom/Rosie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcdom/Rosie/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcdom/Rosie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcdom/Rosie/statuses/{sha}","languages_url":"https://api.github.com/repos/jcdom/Rosie/languages","stargazers_url":"https://api.github.com/repos/jcdom/Rosie/stargazers","contributors_url":"https://api.github.com/repos/jcdom/Rosie/contributors","subscribers_url":"https://api.github.com/repos/jcdom/Rosie/subscribers","subscription_url":"https://api.github.com/repos/jcdom/Rosie/subscription","commits_url":"https://api.github.com/repos/jcdom/Rosie/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcdom/Rosie/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcdom/Rosie/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcdom/Rosie/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcdom/Rosie/contents/{+path}","compare_url":"https://api.github.com/repos/jcdom/Rosie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcdom/Rosie/merges","archive_url":"https://api.github.com/repos/jcdom/Rosie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcdom/Rosie/downloads","issues_url":"https://api.github.com/repos/jcdom/Rosie/issues{/number}","pulls_url":"https://api.github.com/repos/jcdom/Rosie/pulls{/number}","milestones_url":"https://api.github.com/repos/jcdom/Rosie/milestones{/number}","notifications_url":"https://api.github.com/repos/jcdom/Rosie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcdom/Rosie/labels{/name}","releases_url":"https://api.github.com/repos/jcdom/Rosie/releases{/id}","deployments_url":"https://api.github.com/repos/jcdom/Rosie/deployments","created_at":"2017-02-08T12:33:54Z","updated_at":"2017-02-08T12:33:56Z","pushed_at":"2017-02-08T16:53:54Z","git_url":"git://github.com/jcdom/Rosie.git","ssh_url":"git@github.com:jcdom/Rosie.git","clone_url":"https://github.com/jcdom/Rosie.git","svn_url":"https://github.com/jcdom/Rosie","homepage":"","size":13895,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Karumi:master","ref":"master","sha":"41e3756dc85b43ff10db0770d1a5537b5895b6ad","user":{"login":"Karumi","id":6469715,"avatar_url":"https://avatars.githubusercontent.com/u/6469715?v=3","gravatar_id":"","url":"https://api.github.com/users/Karumi","html_url":"https://github.com/Karumi","followers_url":"https://api.github.com/users/Karumi/followers","following_url":"https://api.github.com/users/Karumi/following{/other_user}","gists_url":"https://api.github.com/users/Karumi/gists{/gist_id}","starred_url":"https://api.github.com/users/Karumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Karumi/subscriptions","organizations_url":"https://api.github.com/users/Karumi/orgs","repos_url":"https://api.github.com/users/Karumi/repos","events_url":"https://api.github.com/users/Karumi/events{/privacy}","received_events_url":"https://api.github.com/users/Karumi/received_events","type":"Organization","site_admin":false},"repo":{"id":46555171,"name":"Rosie","full_name":"Karumi/Rosie","owner":{"login":"Karumi","id":6469715,"avatar_url":"https://avatars.githubusercontent.com/u/6469715?v=3","gravatar_id":"","url":"https://api.github.com/users/Karumi","html_url":"https://github.com/Karumi","followers_url":"https://api.github.com/users/Karumi/followers","following_url":"https://api.github.com/users/Karumi/following{/other_user}","gists_url":"https://api.github.com/users/Karumi/gists{/gist_id}","starred_url":"https://api.github.com/users/Karumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Karumi/subscriptions","organizations_url":"https://api.github.com/users/Karumi/orgs","repos_url":"https://api.github.com/users/Karumi/repos","events_url":"https://api.github.com/users/Karumi/events{/privacy}","received_events_url":"https://api.github.com/users/Karumi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Karumi/Rosie","description":"Rosie is an Android framework to create applications following the principles of Clean Architecture.","fork":false,"url":"https://api.github.com/repos/Karumi/Rosie","forks_url":"https://api.github.com/repos/Karumi/Rosie/forks","keys_url":"https://api.github.com/repos/Karumi/Rosie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Karumi/Rosie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Karumi/Rosie/teams","hooks_url":"https://api.github.com/repos/Karumi/Rosie/hooks","issue_events_url":"https://api.github.com/repos/Karumi/Rosie/issues/events{/number}","events_url":"https://api.github.com/repos/Karumi/Rosie/events","assignees_url":"https://api.github.com/repos/Karumi/Rosie/assignees{/user}","branches_url":"https://api.github.com/repos/Karumi/Rosie/branches{/branch}","tags_url":"https://api.github.com/repos/Karumi/Rosie/tags","blobs_url":"https://api.github.com/repos/Karumi/Rosie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Karumi/Rosie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Karumi/Rosie/git/refs{/sha}","trees_url":"https://api.github.com/repos/Karumi/Rosie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Karumi/Rosie/statuses/{sha}","languages_url":"https://api.github.com/repos/Karumi/Rosie/languages","stargazers_url":"https://api.github.com/repos/Karumi/Rosie/stargazers","contributors_url":"https://api.github.com/repos/Karumi/Rosie/contributors","subscribers_url":"https://api.github.com/repos/Karumi/Rosie/subscribers","subscription_url":"https://api.github.com/repos/Karumi/Rosie/subscription","commits_url":"https://api.github.com/repos/Karumi/Rosie/commits{/sha}","git_commits_url":"https://api.github.com/repos/Karumi/Rosie/git/commits{/sha}","comments_url":"https://api.github.com/repos/Karumi/Rosie/comments{/number}","issue_comment_url":"https://api.github.com/repos/Karumi/Rosie/issues/comments{/number}","contents_url":"https://api.github.com/repos/Karumi/Rosie/contents/{+path}","compare_url":"https://api.github.com/repos/Karumi/Rosie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Karumi/Rosie/merges","archive_url":"https://api.github.com/repos/Karumi/Rosie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Karumi/Rosie/downloads","issues_url":"https://api.github.com/repos/Karumi/Rosie/issues{/number}","pulls_url":"https://api.github.com/repos/Karumi/Rosie/pulls{/number}","milestones_url":"https://api.github.com/repos/Karumi/Rosie/milestones{/number}","notifications_url":"https://api.github.com/repos/Karumi/Rosie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Karumi/Rosie/labels{/name}","releases_url":"https://api.github.com/repos/Karumi/Rosie/releases{/id}","deployments_url":"https://api.github.com/repos/Karumi/Rosie/deployments","created_at":"2015-11-20T10:22:54Z","updated_at":"2017-02-13T21:04:17Z","pushed_at":"2017-02-08T17:14:23Z","git_url":"git://github.com/Karumi/Rosie.git","ssh_url":"git@github.com:Karumi/Rosie.git","clone_url":"https://github.com/Karumi/Rosie.git","svn_url":"https://github.com/Karumi/Rosie","homepage":"","size":13930,"stargazers_count":1681,"watchers_count":1681,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":142,"mirror_url":null,"open_issues_count":15,"forks":142,"open_issues":15,"watchers":1681,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Karumi/Rosie/pulls/84"},"html":{"href":"https://github.com/Karumi/Rosie/pull/84"},"issue":{"href":"https://api.github.com/repos/Karumi/Rosie/issues/84"},"comments":{"href":"https://api.github.com/repos/Karumi/Rosie/issues/84/comments"},"review_comments":{"href":"https://api.github.com/repos/Karumi/Rosie/pulls/84/comments"},"review_comment":{"href":"https://api.github.com/repos/Karumi/Rosie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Karumi/Rosie/pulls/84/commits"},"statuses":{"href":"https://api.github.com/repos/Karumi/Rosie/statuses/9864d7be02577d0e1941a178c2d86b50e5e1483e"}}}}
{"actor":{"display_login":"flipper83"}}