rafaelweingartner commented on a change in pull request #3143: Fix some LGTM
alerts
URL: https://github.com/apache/cloudstack/pull/3143#discussion_r250406249
##########
File path: api/src/main/java/com/cloud/deploy/DeployDestination.java
##########
@@ -78,6 +78,10 @@ public int hashCode() {
@Override
public boolean equals(Object obj) {
+ if (obj == null)
+ return false;
+ if (!(obj instanceof DeployDestination))
+ return false;
DeployDestination that = (DeployDestination)obj;
if (_dc == null || that._dc == null) {
Review comment:
Besides what @GabrielBrascher suggested, I have one suggestion though.
Can you append the word `this.` to the `_dc` variable? Then, we would have
`this._dc == null || that._dc == null`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services