bdeggleston commented on code in PR #4119:
URL: https://github.com/apache/cassandra/pull/4119#discussion_r2082215423


##########
src/java/org/apache/cassandra/replication/Offsets.java:
##########


Review Comment:
   The primary motivation was avoiding bugs, eliminating defensive copying was 
sort of a secondary motivation. An always mutable collections means that 
forgetting to make a copy somewhere can lead to a correctness bug if we 
accidentally modify a collection that another part of the program assumes is 
immutable.
   
   I agree that making the static set methods always return an immutable 
collection isn’t great though, and will take a look at how to improve that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to