diff --git a/libjava/ChangeLog b/libjava/ChangeLog index f928e364c4b..1334e890fdd 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2005-02-16 Julian Scheid + + * gnu/java/nio/charset/UTF_8.java (decodeLoop): Set inPos to + in.position(). + (encodeLoop): Likewise. + 2005-02-16 Mark Wielaard * Makefile.am (ordinary_java_source_files): Add new files diff --git a/libjava/gnu/java/nio/charset/UTF_8.java b/libjava/gnu/java/nio/charset/UTF_8.java index c2714363949..87df6442360 100644 --- a/libjava/gnu/java/nio/charset/UTF_8.java +++ b/libjava/gnu/java/nio/charset/UTF_8.java @@ -101,7 +101,7 @@ final class UTF_8 extends Charset protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() - int inPos = 0; + int inPos = in.position(); try { while (in.hasRemaining ()) @@ -196,7 +196,7 @@ final class UTF_8 extends Charset protected CoderResult encodeLoop (CharBuffer in, ByteBuffer out) { - int inPos = 0; + int inPos = in.position(); try { // TODO: Optimize this in the case in.hasArray() / out.hasArray()