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
[I]t seems like the implementations of accept(List) and acceptImmutable(List) in JModVisitor both modify the list, if the list contains more than one item. If the list contains only a single item then acceptImmutable(List) returns a new Collections.singletonList() while accept(List) edits the list in-place.
[T]his 'immutable' code originated with 4c079fb, where it actually appears to have been immutable.. except for Lists.set with a collection of more than one item. This caused a later bug and was partially, but not fully removed in 08dc8cd (see also https://gwt-review.googlesource.com/c/gwt/+/7640/7) with some discussion, but the refactor was apparently not completed?
This ticket is to revisit these decisions, either revert changes in 08dc8cd so that JBlock and friends are still immutable and Lists.add changed to correctly produce immutable lists, or to finish removing these APIs and use something like standard Guava or Java 11+ collections.
Consider approaching this after #10007 has some resolution, so we can measure impacts to memory and CPU usage for some sample builds.
The text was updated successfully, but these errors were encountered:
Ticket created from discussion at #10005:
This ticket is to revisit these decisions, either revert changes in 08dc8cd so that JBlock and friends are still immutable and Lists.add changed to correctly produce immutable lists, or to finish removing these APIs and use something like standard Guava or Java 11+ collections.
Consider approaching this after #10007 has some resolution, so we can measure impacts to memory and CPU usage for some sample builds.
The text was updated successfully, but these errors were encountered: