Skip to content

Commit

Permalink
[JENKINS-39067] Findbugs catches bugs like using URL.equals()... who …
Browse files Browse the repository at this point in the history
…knew
  • Loading branch information
stephenc committed Oct 19, 2016
1 parent 6250bac commit 20448a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -91,15 +91,15 @@ public boolean equals(Object o) {

GitHubOrgAction that = (GitHubOrgAction) o;

return getUrl() != null ? getUrl().equals(that.getUrl()) : that.getUrl() == null;
return getUrl() != null ? getUrl().toExternalForm().equals(that.getUrl().toExternalForm()) : that.getUrl() == null;
}

/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return getUrl() != null ? getUrl().hashCode() : 0;
return getUrl() != null ? getUrl().toExternalForm().hashCode() : 0;
}

/**
Expand Down
Expand Up @@ -90,7 +90,7 @@ public boolean equals(Object o) {

GitHubRepoAction that = (GitHubRepoAction) o;

return getUrl() != null ? getUrl().equals(that.getUrl()) : that.getUrl() == null;
return getUrl() != null ? getUrl().toExternalForm().equals(that.getUrl().toExternalForm()) : that.getUrl() == null;

}

Expand All @@ -99,7 +99,7 @@ public boolean equals(Object o) {
*/
@Override
public int hashCode() {
return getUrl() != null ? getUrl().hashCode() : 0;
return getUrl() != null ? getUrl().toExternalForm().hashCode() : 0;
}

/**
Expand Down

0 comments on commit 20448a9

Please sign in to comment.