This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Another ZipEntry fixlet
- From: Mark Wielaard <mark at klomp dot org>
- To: java-patches at gcc dot gnu dot org
- Date: 21 Feb 2003 17:55:23 +0100
- Subject: FYI: Another ZipEntry fixlet
- Organization:
Hi,
An anonymous GNU Classpath reporter keeps finding little bugs in out
java.util.zip implementation. I have added a new Mauve test for this and
checked that it gets fixeed with this patch.
2003-02-21 Mark Wielaard <mark at klomp dot org>
* java/util/zip/ZipEntry.java (setComment): Don't check length when
argument is null.
I am checking this in to the branch and mainline.
Cheers,
Mark
Index: java/util/zip/ZipEntry.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/zip/ZipEntry.java,v
retrieving revision 1.16
diff -u -r1.16 ZipEntry.java
--- java/util/zip/ZipEntry.java 21 Feb 2003 14:08:40 -0000 1.16
+++ java/util/zip/ZipEntry.java 21 Feb 2003 16:52:27 -0000
@@ -369,7 +369,7 @@
*/
public void setComment(String comment)
{
- if (comment.length() > 0xffff)
+ if (comment != null && comment.length() > 0xffff)
throw new IllegalArgumentException();
this.comment = comment;
}