You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are not the same. The second one results in a guaranteed unmodifiable list while the first one doesn't guarantee anything but the current implementation return a modifiable list.
In fact, this kind of change breaks our own code. See PR #348.
The text was updated successfully, but these errors were encountered:
Trying to detect if the List is mutated seems like folly, since even in our own code's example, the mutation happens after the List is returned from the function its in.
Trying to detect if the List is mutated seems like folly, since even in our own code's example, the mutation happens after the List is returned from the function its in.
I don't think there is any other simple solution other than that.
Other than outright disable this, we could mark this as merge after review and warn them in the docs about possible breakage like this.
Despite the recommendation from the associated sonar rule to replace:
These are not the same. The second one results in a guaranteed unmodifiable list while the first one doesn't guarantee anything but the current implementation return a modifiable list.
In fact, this kind of change breaks our own code. See PR #348.
The text was updated successfully, but these errors were encountered: