Details
-
Type:
Enhancement
-
Status: Closed
-
Priority:
P3
-
Resolution: Not an Issue
-
Affects Version/s: 7
-
Fix Version/s: None
-
Component/s: core-libs
-
Labels:
-
Subcomponent:
-
CPU:generic
-
OS:generic
Description
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);
}
}
=====================