File: src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
Issue: ZipArchiveInputStream and ZipFile don't produce equals ZipArchiveEntry instances
I'm trying to use a ZipArchiveEntry coming from ZipArchiveInputStream that I stored somwhere for later with a ZipFile and it does not work.
The reason is that it can't find the ZipArchiveEntry in the ZipFile entries map. It is exactly the same zip file but both entries are not equals so the Map#get fail.
As far as I can see the main difference is that comment is null in ZipArchiveInputStream while it's en empty string in ZipFile. I looked at ZipArchiveInputStream and it looks like the comment (whatever it is) is simply not parsed while I can find some code related to the comment at the end of ZIipFile#readCentralDirectoryEntry.
Note that java.util.zip does not have this issue. Did not checked what they do but the zip entries are equals.

Buggy code:
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    ZipArchiveEntry other = (ZipArchiveEntry) obj;
    String myName = getName();
    String otherName = other.getName();
    if (myName == null) {
        if (otherName != null) {
            return false;
        }
    } else if (!myName.equals(otherName)) {
        return false;
    }
    String myComment = getComment();
    String otherComment = other.getComment();
    if (myComment == null) {
        if (otherComment != null) {
            return false;
        }
    } else if (!myComment.equals(otherComment)) {
        return false;
    }
    return getTime() == other.getTime()
        && getInternalAttributes() == other.getInternalAttributes()
        && getPlatform() == other.getPlatform()
        && getExternalAttributes() == other.getExternalAttributes()
        && getMethod() == other.getMethod()
        && getSize() == other.getSize()
        && getCrc() == other.getCrc()
        && getCompressedSize() == other.getCompressedSize()
        && Arrays.equals(getCentralDirectoryExtra(),
                         other.getCentralDirectoryExtra())
        && Arrays.equals(getLocalFileDataExtra(),
                         other.getLocalFileDataExtra())
        && gpb.equals(other.gpb);
}

Fixed code:
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    ZipArchiveEntry other = (ZipArchiveEntry) obj;
    String myName = getName();
    String otherName = other.getName();
    if (myName == null) {
        if (otherName != null) {
            return false;
        }
    } else if (!myName.equals(otherName)) {
        return false;
    }
    String myComment = getComment();
    String otherComment = other.getComment();
    if (myComment == null) {
        myComment = "";
    }
    if (otherComment == null) {
        otherComment = "";
    }
    return getTime() == other.getTime()
        && myComment.equals(otherComment)
        && getInternalAttributes() == other.getInternalAttributes()
        && getPlatform() == other.getPlatform()
        && getExternalAttributes() == other.getExternalAttributes()
        && getMethod() == other.getMethod()
        && getSize() == other.getSize()
        && getCrc() == other.getCrc()
        && getCompressedSize() == other.getCompressedSize()
        && Arrays.equals(getCentralDirectoryExtra(),
                         other.getCentralDirectoryExtra())
        && Arrays.equals(getLocalFileDataExtra(),
                         other.getLocalFileDataExtra())
        && gpb.equals(other.gpb);
}