-
Notifications
You must be signed in to change notification settings - Fork 823
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
Removed double null check with instance operator #5224
Conversation
Sometimes found usage of instance operator with variable superflous check for null. But also there is not only variables. Additional null check performs with map.get() or method() and so on.
Clone of #5205 closed PR with code format fix |
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.
A kind request: next time, please split such huge work into more commits or better more pul requests, e.g. one per cluster. More reviewers can work in parallel, and review of a smaller chunk is less error prone.
Looks good except the one forgotten != null not converted.
@@ -120,7 +120,7 @@ public PropertyDialogManager( | |||
if (env != null) { | |||
Object helpID = env.getFeatureDescriptor().getValue(ExPropertyEditor.PROPERTY_HELP_ID); | |||
|
|||
if ((helpID != null) && helpID instanceof String && (component != null) && component instanceof JComponent) { | |||
if (helpID instanceof String && (component != null) && component instanceof JComponent) { |
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.
Yet another != null && instanceof :)
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.
Fixed.
Im entirely agree about task splitting
Sometimes found usage of instance operator with variable superflous check for null. But also there is not only variables. Additional null check performs with map.get() or method() and so on.
Sometimes found usage of instance operator with variable superflous check for null. But also there is not only variables. Additional null check performs with map.get() or method() and so on.
Sometimes found usage of instance operator with variable superflous check for null. But also there is not only variables. Additional null check performs with map.get() or method() and so on.
Sometimes found usage of instance operator with variable superflous check for null. But also there is not only variables. Additional null check performs with map.get() or method() and so on.
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.
Did just review against the last state 2nd time. No need to further split this one, I see you've already partitioned the next round of code cleanup - thanks !
This is fine by me, but I'd advise that one other reviewer would scan through the changes. As there are so many same-type changes, eyes & brain get tired and may miss something.
@sdedic I dont see errors. Who can review? |
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.
Looks sane to me. Thank you. I restarted the failed CI/CD run "NetBeans / Build Tools on Linux/JDK 8 (pull_request)", which failed in a module, that is known to be flaky.
The |
Rerunning all tests finally fixed the tests. |
Sometimes found usage of instance operator with variable superflous check for null. But also there is not only variables. Additional null check performs with map.get() or method() and so on.
Also fixed formatting in org.openide.awt.SplittedPanel.java