[bisq-network/bisq] ConcurrentModificationException FileManager::saveToFile (#3752)

Julian Knutsen notifications at github.com
Thu Dec 5 22:30:44 UTC 2019


It looks like `BallotListService` passes in an unsafe object to the storage code:

`BallotList` contains `List<T>`

The `onChanged()` handler persists to a file after every new object which on a fresh install means a lot of changes quickly in sequence. If the `List` changes out from underneath the `FileManager` I believe this error will occur.

Here is the offending code that updates while iterating:
```
    public protobuf.BallotList.Builder getBuilder() {
        return protobuf.BallotList.newBuilder()
                .addAllBallot(getList().stream()
                        .map(Ballot::toProtoMessage)
                        .collect(Collectors.toList()));
    }
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/3752#issuecomment-562347857
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191205/d9590ff0/attachment.html>


More information about the bisq-github mailing list