commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #1831] [Patch #1831] bug compatibility with sun for ZipInputStrea


From: noreply
Subject: [patch #1831] [Patch #1831] bug compatibility with sun for ZipInputStream
Date: Sat, 25 Oct 2003 08:51:04 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031010 Galeon/1.3.9

Patch #1831 has been updated. 

Project: 
Category: None
Status: Open
Summary: bug compatibility with sun for ZipInputStream

Follow-Ups:

Date: Sat 08/16/03 at 10:36
By: mark

Comment:
You return null, but don't call close(). Does that mean that you can just try 
and keep calling getNextEntry() till the zip stream is "in sync" again?



Do you have an example zip file and/or code that shows what goes wrong/should 
happen in this case?



P.S. Please just remove old code. Commenting it out makes the patch more 
confusing and the old code will show up in the diff/patch anyway.
-------------------------------------------------------

Date: Sat 08/16/03 at 10:45
By: mark

Comment:
My suggestion would be the following patch. But I don't know if that is really 
what you are after.



diff -u -r1.12 ZipInputStream.java

--- java/util/zip/ZipInputStream.java   18 Jun 2003 09:42:57 -0000      1.12

+++ java/util/zip/ZipInputStream.java   16 Aug 2003 08:43:44 -0000

@@ -151,9 +151,17 @@

        close();

        return null;

       }

+

     if (header != LOCSIG)

-      throw new ZipException("Wrong Local header signature: "

-                            + Integer.toHexString(header));

+      {

+       // Stream gone bad.

+       // We could throw a ZipException, but just closing the stream is

+       // easier to handle by most applications and seems to be done by

+       // other implementations.

+       close();

+       return null;

+      }

+

     /* skip version */

     readLeShort();

     flags = readLeShort();


-------------------------------------------------------

Date: Fri 10/24/03 at 18:28
By: robilad

Comment:
Running JBoss 3.2.2 seems to be a good way to trigger this one. Look into the 
jboss-3.2.2/server/defualt/log/boot.log file, and see the IOExceptions being 
thrown for broken ZipInputStreams.



According to a post on the kaffe mailing list, the behaviour of JDK is to 
return null in such cases.
-------------------------------------------------------

Date: Sat 10/25/03 at 14:51
By: mark

Comment:
Can you figure out why the IOExceptions are triggered in the 
jboss-3.2.2/server/defualt/log/boot.log file?



Maybe we generate a broken ZipInputStream somehow?

Then that would be the actual bug we have to fix.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://savannah.gnu.org/patch/?func=detailpatch&patch_id=1831&group_id=85

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]