osdir.com
mailing list archive

Subject: Some simple java.util.zip changes - msg#00182

List: java.vm.kaffe.general

Date: Prev Next Index Thread: Prev Next Index
Hi,

Helmer found a nasty bug in the Classpath readManifest() implementation.
Which is now fixed in Classpath and for which there is a new test in
Mauve.

When I make the following simple changes to kaffe java/util/zip then I
can just drop in Classpath java/util/jar and all kaffe tests and the jar
mauve tests succeed with that.

Cheers,

Mark
Index: ChangeLog
===================================================================
RCS file: /cvs/kaffe/kaffe/ChangeLog,v
retrieving revision 1.1718
diff -u -r1.1718 ChangeLog
--- ChangeLog 25 Oct 2003 20:00:11 -0000 1.1718
+++ ChangeLog 26 Oct 2003 15:05:14 -0000
@@ -1,3 +1,11 @@
+2003-10-26 Mark Wielaard <mark@xxxxxxxxx>
+
+ * libraries/javalib/java/util/zip/ZipFile.java
+ (ZipFile(File f, int mode)): New (dummy) method.
+ * libraries/javalib/java/util/zip/ZipInputStream.java
+ (getNextEntry): Use createZipEntry().
+ (createZipEntry): Implement.
+
2003-10-25 Dalibor Topic <robilad@xxxxxxxxx>

* FAQ/FAQ.automake: Recommend autmake 1.7.8.
Index: libraries/javalib/java/util/zip/ZipFile.java
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/javalib/java/util/zip/ZipFile.java,v
retrieving revision 1.11
diff -u -r1.11 ZipFile.java
--- libraries/javalib/java/util/zip/ZipFile.java 29 Sep 2003 23:50:26
-0000 1.11
+++ libraries/javalib/java/util/zip/ZipFile.java 26 Oct 2003 15:05:14
-0000
@@ -51,6 +51,12 @@
this(f.getPath());
}

+public ZipFile(File f, int mode) throws ZipException, IOException
+{
+ // XXX ignoring mode for now
+ this(f);
+}
+
public void close() throws IOException
{
if (zip != null) {
Index: libraries/javalib/java/util/zip/ZipInputStream.java
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/javalib/java/util/zip/ZipInputStream.java,v
retrieving revision 1.17
diff -u -r1.17 ZipInputStream.java
--- libraries/javalib/java/util/zip/ZipInputStream.java 24 Oct 2003 16:42:11
-0000 1.17
+++ libraries/javalib/java/util/zip/ZipInputStream.java 26 Oct 2003 15:05:15
-0000
@@ -63,7 +63,7 @@
readFully(extra, 0, extra.length);

// Setup new entry
- entry = new ZipEntry(UTF8.decode(nameBuf));
+ entry = createZipEntry(UTF8.decode(nameBuf));
entry.version = get16(zheader, LOCVER);
entry.flag = get16(zheader, LOCFLG);

@@ -211,8 +211,7 @@
}

protected ZipEntry createZipEntry(String name) {
- // XXX FIXME what is this supposed to do?
- return null;
+ return new ZipEntry(name);
}
}

Attachment: signature.asc
Description: This is a digitally signed message part

Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Mozilla plugin

Hi every body, Does the Malefile of mozilla-oji-plugin have error, because when i compile it, it can not find header files and libraries, TNX Amir __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/

Next Message by Date: click to view message preview

Re: java.lang.IllegalAccessError

Hi, >>>>> ":" == Helmer Krämer <hkraemer@xxxxxxxxxx> writes: >> Apparently KJC choses to protect the inner class (as usual). I've not >> really seen a specific restriction about access modifiers concerning >> inner classes in doc but the JDK's compiler put your sample class in >> public access (even though you explicitly specified it protected). The >> best guess I can make is to ignore the access modifier for inner classes >> in KJC. I'll prepare this for tomorrow. :> I don't think that this would be the correct fix (altering :> the access modifiers during compilation doesn't look right :> to me). For a discussion of a similar problem have a look :> at the thread starting at this mail: :> I think the real problem is kaffe's runtime access checking, :> which is why I'm about to check in the following patch: Thanks to your patch, my test case now gives the following results: Compiler Runtime VM Result -------- ---------- ------------------------- KJC Kaffe OK JDK OK JDK -verify java.lang.IllegalAccessError javac of JDK Kaffe OK JDK OK JDK -verify OK So in the kaffe world this issue has been settled, but if we want KJC to be compatible with Sun's javac, Guilhem's work is waited for. Cases similar to my test case is appearing in some important applications such as JExcelAPI and HSQLDB.

Previous Message by Thread: click to view message preview

Mozilla plugin

Hi every body, Does the Malefile of mozilla-oji-plugin have error, because when i compile it, it can not find header files and libraries, TNX Amir __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/

Next Message by Thread: click to view message preview

Re: Some simple java.util.zip changes

Hi Mark, Mark Wielaard wrote: Hi, Helmer found a nasty bug in the Classpath readManifest() implementation. Which is now fixed in Classpath and for which there is a new test in Mauve. When I make the following simple changes to kaffe java/util/zip then I can just drop in Classpath java/util/jar and all kaffe tests and the jar mauve tests succeed with that. Thanks for the patch and the suggestion. I checked in your patch, and merged in java.util.jar from GNU Classpath. cheers, dalibpr topic
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by