Skip to content

Commit

Permalink
chore: circumvention for prettier-java parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
murdos committed Dec 19, 2024
1 parent 993d83a commit af14698
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ public int hashCode() {
}

@Override
// java:S6878 disabled because fixed code triggers a prettier-java bug:
// https://github.com/jhipster/prettier-java/issues/707
@SuppressWarnings("java:S6878")
@ExcludeFromGeneratedCodeCoverage
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (!(obj instanceof Project(ProjectName otherName, byte[] otherContent))) {
if (!(obj instanceof Project other)) {
return false;
}

return new EqualsBuilder().append(name, otherName).append(content, otherContent).isEquals();
return new EqualsBuilder().append(name, other.name()).append(content, other.content()).isEquals();
}

@Override
Expand Down

0 comments on commit af14698

Please sign in to comment.