Repository navigation
Fix NPE in DocumentMerger.doDiff #123 - #2990
Open
ravnskjaer wants to merge 1 commit into
Open
ravnskjaer wants to merge 1 commit into
ravnskjaer wants to merge 1 commit into
Conversation
ravnskjaer
force-pushed
the
fix-123-documentmerger-npe
branch
from
October 4, 2026 09:51
5098d7c to
693ea16
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The timing-sensitive fix lacks a deterministic regression test covering the reported race.
1 open finding
What changed in this PR
Prevents duplicate compare content trees and the resulting DocumentMerger NPE during asynchronous initialization.
Changes:
- Detects re-entrant control creation.
- Skips duplicate content creation while a control is already being built.
| File | Description |
|---|---|
CompareEditor.java |
Guards the initialization callback against duplicate compare controls. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
The "still initializing" timer and the initialization job could both create the contents of the same compare editor input. One of the two content trees stayed alive when the editor switched to another input, and its viewer later diffed against the disposed input. Add a regression test and a DisplayUtils helper for driving the event loop in tests. Fixes eclipse-platform#123
ravnskjaer
force-pushed
the
fix-123-documentmerger-npe
branch
from
October 9, 2026 18:06
693ea16 to
54edb62
Compare
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.

The "still initializing" timer and the initialization job could both create the contents of the same compare editor input. One of the two content trees stayed alive when the editor switched to another input, and its viewer later diffed against the disposed input.
Fixes #123