Fix NPE when restoring layout to default value#1265
Merged
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom Oct 11, 2025
Merged
Fix NPE when restoring layout to default value#1265ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
Conversation
e8d0895 to
914705d
Compare
The changes introduced with 7ff0657 cause an exception, if no layout is set. Instead of an empty string, the "null" string is used to describe the implict layout. This breaks the selection on the preference page. If no layout with this id is found, the call to setDefaultLayout() fails with a NullPointerException, which is the case for the default selection or if a layout no longer exists. Using the GridLayout as an implicit layout is also not the correct behavior. If this is the desired behavior, the GridLayout must be selected in the preference page.
914705d to
73e1522
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 changes introduced with 7ff0657 cause an exception, if no layout is set. Instead of an empty string, the "null" string is used to describe the implict layout. This breaks the selection on the preference page.
If no layout with this id is found, the call to setDefaultLayout() fails with a NullPointerException, which is the case for the default selection or if a layout no longer exists.
Using the GridLayout as an implicit layout is also not the correct behavior. If this is the desired behavior, the GridLayout must be selected in the preference page.