Repository navigation
Fix NPE in DocumentMerger.doDiff #123 - #2990
ravnskjaer wants to merge 1 commit into
Conversation
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.
693ea16 to
54edb62
Compare
|
@iloveeclipse I’ve added the regression test Copilot asked for (CompareEditorOpenRaceTest). The GitHub workflows are awaiting approval, and the Jenkins build timed out for this PR too. Could you approve the workflows and retrigger Jenkins? |
54edb62 to
e68f885
Compare
|
Thanks for retriggering, @iloveeclipse, all checks are green now and the Copilot finding is addressed with the new regression test. Could you take a look and merge if it looks good to you? |
|
@iloveeclipse sorry to bother you again - if you don't have the time, can you maybe direct me to someone else who can review it? |
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
e68f885 to
8260564
Compare


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