Skip to content

Commit

Permalink
fix: sonar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taoran1250 committed Dec 26, 2024
1 parent 7dba98a commit d7ce29e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ public boolean equalsTo(Resource r) {
if (v instanceof Integer && rsV instanceof Integer) {
return (int) v != (int) rsV;
} else if (v instanceof Double && rsV instanceof Double) {
return BigDecimal.valueOf((double) v).equals(BigDecimal.valueOf((double) rsV));
return !BigDecimal.valueOf((double) v).equals(BigDecimal.valueOf((double) rsV));
} else if (v instanceof Long && rsV instanceof Long) {
return (long) v != (long) rsV;
} else if (v instanceof Float && rsV instanceof Float) {
return BigDecimal.valueOf((float) v).equals(BigDecimal.valueOf((float) rsV));
return !BigDecimal.valueOf((float) v).equals(BigDecimal.valueOf((float) rsV));
} else if (v instanceof Short && rsV instanceof Short) {
return (short) v != (short) rsV;
} else {
Expand Down

0 comments on commit d7ce29e

Please sign in to comment.