This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Another ZipEntry fixlet


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;
   }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]