Github user bodewig commented on a diff in the pull request:
https://github.com/apache/commons-compress/pull/61#discussion_r161848043
--- Diff:
src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
---
@@ -418,12 +418,8 @@ public boolean equals(final Object o) {
}
// summary is always null right now, but this may change some day
- if ((summary == null && rhs.summary != null) // NOSONAR
- || (summary != null && !summary.equals(rhs.summary))) { //
NOSONAR
- return false;
- }
-
- return true;
+ return (summary != null || rhs.summary == null) // NOSONAR
+ && (summary == null || summary.equals(rhs.summary));
}
--- End diff --
I find this version a lot harder to read than the original expression. I'm
totally fine with getting rid of the `if`, but please keep the original logic.
---