-
Notifications
You must be signed in to change notification settings - Fork 9
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
Rj cleanup ide warnings and code formatting #163
Rj cleanup ide warnings and code formatting #163
Conversation
if (o == null) return false; | ||
if (o == null) { | ||
return false; | ||
} |
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 addition is causing a spot bugs error in the build:
[INFO] org.openlcb.swing.NodeSelector$ModelEntry defines equals and uses Object.hashCode() [org.openlcb.swing.NodeSelector$ModelEntry] At NodeSelector.java:[lines 169-178] HE_EQUALS_USE_HASHCODE
335[INFO]
The next line Includes an instanceof operator. Instanceof returns false for null, so the null case is already handled.
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.
Removed null check in equals() as requested. Also added hashCode() to potentially fix spot bugs warning.
Could you please give me a hint on how to execute spot bugs to prevent such warnings on future changes?
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.
Spogbugs is run on travis using the following Maven command:
mvn clean verify -U -P spotbugs --batch-mode -Dmaven.javadoc.skip=true
First batch of changes to clean up warnings of eclipse IDE and improve code formatting. Patch does not change internal logic.