-
Notifications
You must be signed in to change notification settings - Fork 642
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
Tiny suggestion : remove Redundant-null-check on "Shell.java" #16
Comments
Its part of several checks each of which begin with this. It's a code-style-preference thing. I prefer it to be this way, redundant or not. |
I don't understand. |
Because in cases like these the blocks below that check and set this variable tend to get switched around and cases added over time. Keeping the check there will prevent the logical failure that will occur when the blocks are copy/pasted to change order. There's no technical reason for this, I just prefer it this way as it prevents a possible future logic failure and is clearer to read (imho). Feel free to disagree, I feel free to not care. The compiler/optimizer will take it out anyway if it is redundant. |
So you keep a check because you might move the block of code to somewhere else? Anyway, I will just turn off this warning for this library. |
Stop trying to debate preference. This is exactly why I dislike open source. I have better things to do than discussing this - it's certainly not like we're ever going to agree on it, and worse, it really doesn't matter. |
OK OK. |
running some warnings checks of Eclipse, I've found a warning of a redundant-null-check :
this should be removed.
The text was updated successfully, but these errors were encountered: