{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4354","repository_url":"https://api.github.com/repos/ReactiveX/RxJava","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4354/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4354/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4354/events","html_url":"https://github.com/ReactiveX/RxJava/pull/4354","id":171321492,"number":4354,"title":"2.x: Expose values and errors as unmodifiable snapshots not shared mutable lists.","user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ReactiveX/RxJava/milestones/14","html_url":"https://github.com/ReactiveX/RxJava/milestones/2.0%20RC%201","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/milestones/14/labels","id":1835497,"number":14,"title":"2.0 RC 1","description":"4th gen architecture established; packages set up; operators named, selected and documented; most common operators fusion-enabled.","creator":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars.githubusercontent.com/u/1269832?v=3","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":120,"state":"open","created_at":"2016-06-17T22:57:03Z","updated_at":"2016-08-16T11:19:50Z","due_on":"2016-08-25T22:00:00Z","closed_at":null},"comments":7,"created_at":"2016-08-16T04:14:13Z","updated_at":"2016-08-16T13:06:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/4354","html_url":"https://github.com/ReactiveX/RxJava/pull/4354","diff_url":"https://github.com/ReactiveX/RxJava/pull/4354.diff","patch_url":"https://github.com/ReactiveX/RxJava/pull/4354.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/240095432","html_url":"https://github.com/ReactiveX/RxJava/pull/4354#issuecomment-240095432","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4354","id":240095432,"user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T13:06:25Z","updated_at":"2016-08-16T13:06:25Z","body":"I had accidentally mutated this shared list in one of my tests because of\nsimilar variable names which is what led me to expose it as unmodifiable. I\nwas surprised that it wasn't already an unmodifiable snapshot, but the\nactual live mutable list. Even with the snapshot, modifying the list of\nvalues seems like an indicator that you are testing poorly (or flat out\nincorrectly).\n\nOn Tue, Aug 16, 2016 at 8:56 AM David Karnok <notifications@github.com>\nwrote:\n\n> I see that you do a snapshot but then why prevent any change to it?\n> Besides, I have tests that have thousands elements which are then checked\n> for a particular pattern\n> <https://github.com/ReactiveX/RxJava/blob/2.x/src/test/java/io/reactivex/internal/operators/flowable/FlowableFlatMapTest.java#L473>\n> by iterating over the shared list (or just sloppily do a size() on it\n> <https://github.com/ReactiveX/RxJava/blob/2.x/src/test/java/io/reactivex/internal/operators/flowable/FlowableMergeTest.java#L946>\n> ).\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/ReactiveX/RxJava/pull/4354#issuecomment-240092965>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAEEEdau4k7F1NflbnYWv_WJ0hMU7JbOks5qgbNigaJpZM4JlBa7>\n> .\n>\n"}}
{"actor":{"display_login":"JakeWharton"}}