This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: java.nio
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Sat, 17 Jul 2004 10:47:30 +0200
- Subject: Patch: java.nio
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I just commited the attached patch to fix a bug in
java.nio.charset.CharsetDecoder and to remove unused cruft in
java.nio.ByteOrder.
Michael
2004-07-17 Michael Koch <konqueror@gmx.de>
* java/nio/ByteOrder.java
(static): Removed. Not needed.
Thanks to Patrick Reali for noticing.
* java/nio/charset/CharsetDecoder.java
(decode): Fix for classpath bug #9177: Reset state before flipping.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD4DBQFA+OekWSOgCCdjSDsRAtKuAJd9IXkFTomMy1zqp+41CTi1mo7wAJ43EVh7
Vo7/IMhIiF8f+zb/coeKHg==
=uD7i
-----END PGP SIGNATURE-----
Index: java/nio/ByteOrder.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/nio/ByteOrder.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 ByteOrder.java
--- java/nio/ByteOrder.java 28 Feb 2004 21:16:17 -0000 1.4
+++ java/nio/ByteOrder.java 17 Jul 2004 08:43:15 -0000
@@ -49,19 +49,10 @@
public static final ByteOrder BIG_ENDIAN = new ByteOrder();
public static final ByteOrder LITTLE_ENDIAN = new ByteOrder();
- static
- {
- // load the shared library needed for native methods.
- if (Configuration.INIT_LOAD_LIBRARY)
- {
- System.loadLibrary ("javanio");
- }
- }
-
/**
* Returns the native byte order of the platform currently running.
*/
- public static ByteOrder nativeOrder ()
+ public static ByteOrder nativeOrder()
{
return (System.getProperty ("gnu.cpu.endian").equals("big")
? BIG_ENDIAN : LITTLE_ENDIAN);
@@ -76,7 +67,7 @@
}
// This class can only be instantiated here.
- private ByteOrder ()
+ private ByteOrder()
{
}
}
Index: java/nio/charset/CharsetDecoder.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/nio/charset/CharsetDecoder.java,v
retrieving revision 1.1
diff -u -b -B -r1.1 CharsetDecoder.java
--- java/nio/charset/CharsetDecoder.java 13 Nov 2002 12:21:26 -0000 1.1
+++ java/nio/charset/CharsetDecoder.java 17 Jul 2004 08:43:15 -0000
@@ -129,6 +129,7 @@
if (cr.isError ())
cr.throwException ();
+ reset();
out.flip ();
return out;
}