-
Enhancement
-
Resolution: Not an Issue
-
P3
-
None
-
7
-
generic
-
generic
ZipFile.getComment() should also check EFS bit like getInputStream() and getZipEntry() do.
While the current implementaion does NOT check this.
================
/**
* Returns the zip file comment, or null if none.
*
* @return the comment string for the zip file, or null if none
*
* @throws IllegalStateException if the zip file has been closed
*
* Since 1.7
*/
public String getComment() {
synchronized (this) {
ensureOpen();
byte[] bcomm = getCommentBytes(jzfile);
if (bcomm == null)
return null;
return zc.toString(bcomm, bcomm.length);
}
}
=====================
While the current implementaion does NOT check this.
================
/**
* Returns the zip file comment, or null if none.
*
* @return the comment string for the zip file, or null if none
*
* @throws IllegalStateException if the zip file has been closed
*
* Since 1.7
*/
public String getComment() {
synchronized (this) {
ensureOpen();
byte[] bcomm = getCommentBytes(jzfile);
if (bcomm == null)
return null;
return zc.toString(bcomm, bcomm.length);
}
}
=====================