{"action":"created","issue":{"url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/288","labels_url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/288/comments","events_url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/288/events","html_url":"https://github.com/AltBeacon/android-beacon-library/issues/288","id":107226692,"number":288,"title":"Necessity of using an unmodifiableList after a consumer has been bound","user":{"login":"matthewmichihara","id":79073,"avatar_url":"https://avatars.githubusercontent.com/u/79073?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewmichihara","html_url":"https://github.com/matthewmichihara","followers_url":"https://api.github.com/users/matthewmichihara/followers","following_url":"https://api.github.com/users/matthewmichihara/following{/other_user}","gists_url":"https://api.github.com/users/matthewmichihara/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewmichihara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewmichihara/subscriptions","organizations_url":"https://api.github.com/users/matthewmichihara/orgs","repos_url":"https://api.github.com/users/matthewmichihara/repos","events_url":"https://api.github.com/users/matthewmichihara/events{/privacy}","received_events_url":"https://api.github.com/users/matthewmichihara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-18T15:43:33Z","updated_at":"2015-09-18T15:50:58Z","closed_at":null,"body":"I just hit a `ConcurrentModificationException` the other day, presumably because I tried to call `BeaconManager.getInstanceForApplication().getBeaconParsers().add(..)` after someone had binded to the beacon manager.\r\n\r\nI noticed that at https://github.com/AltBeacon/android-beacon-library/blob/master/src/main/java/org/altbeacon/beacon/BeaconManager.java#L260-L264, `getBeaconParsers` returns an unmodifiable list if a consumer has already been bound. I understand there are threading concerns around iterating over beacon parsers if people can add / remove from that list at any time, but would it be possible to use something like a [CopyOnWriteArrayList](http://developer.android.com/reference/java/util/concurrent/CopyOnWriteArrayList.html) here instead to safely iterate while preventing `ConcurrentModificationException`s?"},"comment":{"url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/comments/141489045","html_url":"https://github.com/AltBeacon/android-beacon-library/issues/288#issuecomment-141489045","issue_url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/288","id":141489045,"user":{"login":"matthewmichihara","id":79073,"avatar_url":"https://avatars.githubusercontent.com/u/79073?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewmichihara","html_url":"https://github.com/matthewmichihara","followers_url":"https://api.github.com/users/matthewmichihara/followers","following_url":"https://api.github.com/users/matthewmichihara/following{/other_user}","gists_url":"https://api.github.com/users/matthewmichihara/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewmichihara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewmichihara/subscriptions","organizations_url":"https://api.github.com/users/matthewmichihara/orgs","repos_url":"https://api.github.com/users/matthewmichihara/repos","events_url":"https://api.github.com/users/matthewmichihara/events{/privacy}","received_events_url":"https://api.github.com/users/matthewmichihara/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T15:50:58Z","updated_at":"2015-09-18T15:50:58Z","body":"I'm also not sure the `isAnyConsumerBound` guard there is useful, given that I could call `getBeaconParsers` ahead of time to get the raw list, bind, and then modify the beacon parser list with no consequences, sidestepping the `unmodifiableList` protection."}}