Fix preference spy correctness bugs#2345
Open
vogella wants to merge 1 commit into
Open
Conversation
PreferenceEntry equals/hashCode included mutable fields (oldValue, newValue, recentlyChanged, parent) while instances live in a WritableSet that mutates them in place, breaking Set.contains/remove. Base identity on (nodePath, key). The unused 5-arg constructor accepted a parent argument but never assigned it, making it a silent bug magnet. Drop it. PreferenceEntryViewerComparator cast a long time delta to int, risking overflow. Use Long.compare. DeletePreferenceEntries removed entries from the manager, but entries are children of their PreferenceNodeEntry parent, so the call was a no-op for non-root entries. Remove from the actual parent instead. Preparation for eclipse-pde#2344
This was referenced May 21, 2026
Test Results 122 files - 4 122 suites - 4 31m 27s ⏱️ - 4m 22s For more details on these failures, see this check. Results for commit 32b431e. ± Comparison against base commit 0c81951. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Planned for 4.41
Fixes four real correctness issues in the Preference Spy: PreferenceEntry's equals/hashCode included mutable fields while instances live in a WritableSet that mutates them in place, which silently broke Set lookups; PreferenceEntryViewerComparator cast a long time delta to int and could overflow; the DeletePreferenceEntries handler removed entries from the root manager instead of their PreferenceNodeEntry parent, making the action a no-op for non-root rows; and a buggy 5-arg constructor accepted a parent argument that it never assigned. Identity is now (nodePath, key), comparator uses Long.compare, delete walks to the actual parent, and the dead constructor is gone.
Preparation for #2344.