-
Notifications
You must be signed in to change notification settings - Fork 32
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
GroupLaunchConfigurationTabGroup: remove dead code #155
GroupLaunchConfigurationTabGroup: remove dead code #155
Conversation
@@ -349,9 +349,6 @@ protected void editPressed() { | |||
} | |||
if (dialog.open() == Window.OK) { | |||
ILaunchConfiguration[] confs = dialog.getSelectedLaunchConfigurations(); | |||
if (confs.length < 0) { |
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.
Maybe it should be == 0?
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.
i have not found any report that the assert below ever hit. so let's assume conf.length==1
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.
This code was migrated from the original C++ code base . And I believe there must have been a scenario and that's why they added it. What is the benefit in removing this when we are not sure?
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.
I was wondering why there was a check for less than 0 here. I think in Java we can be 100% sure the length of array is never less than 0.
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.
Reducing warnings of static code analysis so that new warnings don't be overlooked by the amount of existing warnings.
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.
As length can never be <0 I plan to merge this one .
4539bd1
to
21353d3
Compare
Array length is never < 0
21353d3
to
a579813
Compare
Array length is never < 0