codeconsole commented on code in PR #16282:
URL: https://github.com/apache/grails-core/pull/16282#discussion_r3977233300
##########
grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingMap.groovy:
##########
@@ -34,12 +34,23 @@ class DirtyCheckingMap implements Map,
DirtyCheckableCollection {
final DirtyCheckable parent
final String property
final int originalSize
+ final boolean assigned
Review Comment:
Following up on this thread, since it is where the "tracks every mutation
path" claim was litigated: reviewing the compiled classes for the latest round
turned up two more `@Delegate`-generated escapes of exactly this kind, now
closed in `a2ac5178cf`.
- The Java 21 `SequencedCollection` mutators — `addFirst`, `addLast`,
`removeFirst`, `removeLast` — were generated straight through to the target on
`DirtyCheckingList` and `DirtyCheckingSortedSet`, with no `markDirty`.
- `DirtyCheckingSortedSet` handed out `headSet`, `tailSet` and `subSet` as
raw live views, the same hole `subList` was overridden for.
Those views (plus `reversed`) now come back as tracking wrappers, and are
constructed as assigned, because a view stored back onto a property is a
wholesale replacement rather than something to diff element by element. The
docs sentence is narrowed to `List` and `SortedSet` properties, since a plain
`Set`/`Map` wrapper does not expose the sequenced API at all.
`Map.Entry.setValue` during iteration is still the one Map path left
untracked, and remains listed as a gap.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]