This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[4.1] Patch: FYI: fix PR 25713
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 10 Mar 2006 13:01:39 -0700
- Subject: [4.1] Patch: FYI: fix PR 25713
- Reply-to: tromey at redhat dot com
I'm checking this in on the 4.1 branch.
This fixes PR 25713 in the simplest possible way.
We were updating the CRC in the wrong place.
I have a different patch for the trunk, which more fully merges
java.util.zip.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
PR libgcj/25713:
* java/util/zip/GZIPOutputStream.java (write(int)): Don't update
CRC.
Index: java/util/zip/GZIPOutputStream.java
===================================================================
--- java/util/zip/GZIPOutputStream.java (revision 111818)
+++ java/util/zip/GZIPOutputStream.java (working copy)
@@ -1,5 +1,5 @@
/* GZIPOutputStream.java - Create a file in gzip format
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -98,7 +98,9 @@
public synchronized void write(int bval) throws IOException
{
super.write(bval);
- crc.update(bval);
+ // super.write(int) eventually calls our write(byte[],int,int),
+ // so updating the CRC here is wrong.
+ // crc.update(bval);
}
public synchronized void write(byte[] buf) throws IOException