Null check for org.eclipse.help.IContext#1863
Null check for org.eclipse.help.IContext#1863HeikoKlare merged 1 commit intoeclipse-platform:masterfrom
Conversation
HeikoKlare
left a comment
There was a problem hiding this comment.
Is this really the right thing to do? Cancelling an execution somewhere deep inside a method because a value is null for undocumented reasons sounds a bit dangerous. And the affected code is actually related to a bug documented here:
The referenced issue was introduced by exactly the code that now may lead to a null value. So the proposed change rather seems to work around an issue with the change made in https://bugs.eclipse.org/bugs/show_bug.cgi?id=533828 than adding an actual missing null pointer check.
Thank you for the detailed review and context. I agree that introducing a null check here may mask the underlying issue rather than addressing its root cause, especially considering the regression mentioned in bug 533828. Given that, I'll go ahead and close this PR. It makes more sense to investigate and resolve the underlying cause of the null value instead of working around. |
|
If the value must not be null at this place, a null check can still be sufficient, e.g using |
thanks I'll update with this |
33a355d to
ad15855
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Makes sense. The updated change is fine for me and it fits to your proposal, @laeubi, doesn't it? |
Check whether context is null or not before invoking getText() Fixes : eclipse-platform#1689
|
Thank you @HeikoKlare |
Check whether context is null or not before invoking getText()
Fixes : #1689