{"action":"closed","number":819,"pull_request":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/819","id":64229253,"html_url":"https://github.com/couchbase/couchbase-lite-android/pull/819","diff_url":"https://github.com/couchbase/couchbase-lite-android/pull/819.diff","patch_url":"https://github.com/couchbase/couchbase-lite-android/pull/819.patch","issue_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/819","number":819,"state":"closed","locked":false,"title":"Fixed java-core 1163 - Replicator sends duplicated Replicator state.","user":{"login":"hideki","id":15889,"avatar_url":"https://avatars.githubusercontent.com/u/15889?v=3","gravatar_id":"","url":"https://api.github.com/users/hideki","html_url":"https://github.com/hideki","followers_url":"https://api.github.com/users/hideki/followers","following_url":"https://api.github.com/users/hideki/following{/other_user}","gists_url":"https://api.github.com/users/hideki/gists{/gist_id}","starred_url":"https://api.github.com/users/hideki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideki/subscriptions","organizations_url":"https://api.github.com/users/hideki/orgs","repos_url":"https://api.github.com/users/hideki/repos","events_url":"https://api.github.com/users/hideki/events{/privacy}","received_events_url":"https://api.github.com/users/hideki/received_events","type":"User","site_admin":false},"body":"Reason duplicated replicator states are notified by `changed()` is because most of unit tests check replicator state which could be already changed to next state. So the replicator enters STOPPING state, then ChangeEvent is fired, next the replicator enters STOPPED state, then ChangeEvent is fired again. When listener receives notification for STOPPING, the replicator state already changed to STOPPED state. So it seems like STOPPED state are fired twice. But actually STOPPING state and STOPPED states are fired. Instead of checking Replicator.status, needs to check transition destination.","created_at":"2016-03-26T05:13:01Z","updated_at":"2016-03-28T17:11:54Z","closed_at":"2016-03-28T17:11:54Z","merged_at":"2016-03-28T17:11:54Z","merge_commit_sha":"4dac71774785c2e6eb09111d744bcfdbe6a2b00e","assignee":{"login":"pasin","id":801454,"avatar_url":"https://avatars.githubusercontent.com/u/801454?v=3","gravatar_id":"","url":"https://api.github.com/users/pasin","html_url":"https://github.com/pasin","followers_url":"https://api.github.com/users/pasin/followers","following_url":"https://api.github.com/users/pasin/following{/other_user}","gists_url":"https://api.github.com/users/pasin/gists{/gist_id}","starred_url":"https://api.github.com/users/pasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasin/subscriptions","organizations_url":"https://api.github.com/users/pasin/orgs","repos_url":"https://api.github.com/users/pasin/repos","events_url":"https://api.github.com/users/pasin/events{/privacy}","received_events_url":"https://api.github.com/users/pasin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/819/commits","review_comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/819/comments","review_comment_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/819/comments","statuses_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/statuses/f73dc21ccd3eade272b51be1dd55682ea26c2370","head":{"label":"couchbase:feature/issue_1163_duplicated_replicator_state_notification","ref":"feature/issue_1163_duplicated_replicator_state_notification","sha":"f73dc21ccd3eade272b51be1dd55682ea26c2370","user":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":9992330,"name":"couchbase-lite-android","full_name":"couchbase/couchbase-lite-android","owner":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/couchbase/couchbase-lite-android","description":"Lightweight, embedded, syncable NoSQL database engine for Android.","fork":false,"url":"https://api.github.com/repos/couchbase/couchbase-lite-android","forks_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/forks","keys_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/teams","hooks_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/hooks","issue_events_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/events","assignees_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/tags","blobs_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/languages","stargazers_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/stargazers","contributors_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/contributors","subscribers_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/subscribers","subscription_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/subscription","commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/merges","archive_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/downloads","issues_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/releases{/id}","deployments_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/deployments","created_at":"2013-05-10T23:36:45Z","updated_at":"2016-03-28T15:37:35Z","pushed_at":"2016-03-28T17:11:54Z","git_url":"git://github.com/couchbase/couchbase-lite-android.git","ssh_url":"git@github.com:couchbase/couchbase-lite-android.git","clone_url":"https://github.com/couchbase/couchbase-lite-android.git","svn_url":"https://github.com/couchbase/couchbase-lite-android","homepage":"http://developer.couchbase.com/mobile/","size":104827,"stargazers_count":693,"watchers_count":693,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":148,"mirror_url":null,"open_issues_count":77,"forks":148,"open_issues":77,"watchers":693,"default_branch":"master"}},"base":{"label":"couchbase:master","ref":"master","sha":"b669a9af452c336ff17e40bf2c8ac120520320b9","user":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":9992330,"name":"couchbase-lite-android","full_name":"couchbase/couchbase-lite-android","owner":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/couchbase/couchbase-lite-android","description":"Lightweight, embedded, syncable NoSQL database engine for Android.","fork":false,"url":"https://api.github.com/repos/couchbase/couchbase-lite-android","forks_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/forks","keys_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/teams","hooks_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/hooks","issue_events_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/events","assignees_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/tags","blobs_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/languages","stargazers_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/stargazers","contributors_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/contributors","subscribers_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/subscribers","subscription_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/subscription","commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/merges","archive_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/downloads","issues_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/releases{/id}","deployments_url":"https://api.github.com/repos/couchbase/couchbase-lite-android/deployments","created_at":"2013-05-10T23:36:45Z","updated_at":"2016-03-28T15:37:35Z","pushed_at":"2016-03-28T17:11:54Z","git_url":"git://github.com/couchbase/couchbase-lite-android.git","ssh_url":"git@github.com:couchbase/couchbase-lite-android.git","clone_url":"https://github.com/couchbase/couchbase-lite-android.git","svn_url":"https://github.com/couchbase/couchbase-lite-android","homepage":"http://developer.couchbase.com/mobile/","size":104827,"stargazers_count":693,"watchers_count":693,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":148,"mirror_url":null,"open_issues_count":77,"forks":148,"open_issues":77,"watchers":693,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/819"},"html":{"href":"https://github.com/couchbase/couchbase-lite-android/pull/819"},"issue":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/819"},"comments":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-android/issues/819/comments"},"review_comments":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/819/comments"},"review_comment":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-android/pulls/819/commits"},"statuses":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-android/statuses/f73dc21ccd3eade272b51be1dd55682ea26c2370"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"pasin","id":801454,"avatar_url":"https://avatars.githubusercontent.com/u/801454?v=3","gravatar_id":"","url":"https://api.github.com/users/pasin","html_url":"https://github.com/pasin","followers_url":"https://api.github.com/users/pasin/followers","following_url":"https://api.github.com/users/pasin/following{/other_user}","gists_url":"https://api.github.com/users/pasin/gists{/gist_id}","starred_url":"https://api.github.com/users/pasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasin/subscriptions","organizations_url":"https://api.github.com/users/pasin/orgs","repos_url":"https://api.github.com/users/pasin/repos","events_url":"https://api.github.com/users/pasin/events{/privacy}","received_events_url":"https://api.github.com/users/pasin/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":44,"deletions":48,"changed_files":4}}