-
Notifications
You must be signed in to change notification settings - Fork 129
Null check for org.eclipse.help.IContext #1863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Check whether context is null or not before invoking getText() Fixes : eclipse-platform#1689
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 patch
Further information are available in Common Build Issues - Missing version increments. |
Check whether context is null or not before invoking getText()
Fixes : #1689