6881337: ZipEntry.setComment() was accidentally changed back to old spec/impl in jdk7-b64

Restored the correct spec and implementation of setComment

Reviewed-by: martin
This commit is contained in:
Xueming Shen 2009-09-11 16:36:22 -07:00
parent 55b5651b11
commit ee98fe5cd9

View File

@ -253,14 +253,10 @@ class ZipEntry implements ZipConstants, Cloneable {
* the first 0xFFFF bytes are output to the ZIP file entry. * the first 0xFFFF bytes are output to the ZIP file entry.
* *
* @param comment the comment string * @param comment the comment string
* @exception IllegalArgumentException if the length of the specified *
* comment string is greater than 0xFFFF bytes
* @see #getComment() * @see #getComment()
*/ */
public void setComment(String comment) { public void setComment(String comment) {
if (comment != null && comment.length() > 0xffff) {
throw new IllegalArgumentException("invalid entry comment length");
}
this.comment = comment; this.comment = comment;
} }