Skip to content

Guard the preference store again in openCompareEditor - #2832

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:fix-unified-diff-npe-preference-store
Open

Guard the preference store again in openCompareEditor#2832
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:fix-unified-diff-npe-preference-store

Conversation

@vogella

@vogella vogella commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The unified diff check added to CompareUIPlugin#openCompareEditor dereferences the compare configuration's preference store before the null guard that immediately follows it. A CompareConfiguration without a preference store is a supported state, so every compare editor open for such a configuration now fails with a NullPointerException.

This moves the unified diff check inside the existing if (ps != null) block. Behavior is unchanged whenever a preference store is present.

The unified diff check dereferenced the compare configuration's preference
store before the null guard that follows it, so every compare editor open
threw a NullPointerException for a configuration without a preference store.
Move the check inside the existing guard.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   56m 50s ⏱️ -52s
 4 690 tests ±0   4 667 ✅  - 1   22 💤 ±0  1 ❌ +1 
11 964 runs  ±0  11 810 ✅  - 1  153 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit ef625c3. ± Comparison against base commit 77eecda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant