ZipEntry.java (setComment): Don't check length when argument is null.

* java/util/zip/ZipEntry.java (setComment): Don't check length when
       argument is null.

From-SVN: r63227
This commit is contained in:
Mark Wielaard
2003-02-21 16:56:58 +00:00
committed by Mark Wielaard
parent 7fb1c86d07
commit 3a3f137e0d
2 changed files with 6 additions and 1 deletions

View File

@@ -369,7 +369,7 @@ public class ZipEntry implements ZipConstants, Cloneable
*/
public void setComment(String comment)
{
if (comment.length() > 0xffff)
if (comment != null && comment.length() > 0xffff)
throw new IllegalArgumentException();
this.comment = comment;
}