Guard the preference store again in openCompareEditor - #2832
Open
vogella wants to merge 1 commit into
Open
Conversation
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.
Contributor
Test Results 54 files ±0 54 suites ±0 56m 50s ⏱️ -52s For more details on these failures, see this check. Results for commit ef625c3. ± Comparison against base commit 77eecda. |
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 unified diff check added to
CompareUIPlugin#openCompareEditordereferences the compare configuration's preference store before the null guard that immediately follows it. ACompareConfigurationwithout 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.