From 651ba822d019a847b5f503dfe5c173826508b472 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Sat, 17 Jul 2004 08:43:43 +0000 Subject: [PATCH] 2004-07-17 Michael Koch * 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. From-SVN: r84856 --- libjava/ChangeLog | 8 ++++++++ libjava/java/nio/ByteOrder.java | 15 +++------------ libjava/java/nio/charset/CharsetDecoder.java | 1 + 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 02184ccd59a..681e17c4cce 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,11 @@ +2004-07-17 Michael Koch + + * 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. + 2004-07-17 Michael Koch * java/security/Security.java: Fixed javadocs all over. diff --git a/libjava/java/nio/ByteOrder.java b/libjava/java/nio/ByteOrder.java index ad0b09ec56e..671336af8dc 100644 --- a/libjava/java/nio/ByteOrder.java +++ b/libjava/java/nio/ByteOrder.java @@ -46,22 +46,13 @@ import gnu.classpath.Configuration; */ public final class ByteOrder { - public static final ByteOrder BIG_ENDIAN = new ByteOrder(); + 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 @@ public final class ByteOrder } // This class can only be instantiated here. - private ByteOrder () + private ByteOrder() { } } diff --git a/libjava/java/nio/charset/CharsetDecoder.java b/libjava/java/nio/charset/CharsetDecoder.java index 185de149fd4..620ff130d32 100644 --- a/libjava/java/nio/charset/CharsetDecoder.java +++ b/libjava/java/nio/charset/CharsetDecoder.java @@ -129,6 +129,7 @@ public abstract class CharsetDecoder if (cr.isError ()) cr.throwException (); + reset(); out.flip (); return out; } -- 2.30.2