2003-05-19 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Mon, 19 May 2003 07:48:35 +0000 (07:48 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Mon, 19 May 2003 07:48:35 +0000 (07:48 +0000)
* java/nio/CharBuffer.java
(toString): Compile fix.

From-SVN: r66953

libjava/ChangeLog
libjava/java/nio/CharBuffer.java

index 0846261dcf5960ebc1633381a142a83fa49ee6a7..d416194f70911f849c54908a416bca27e2db5da9 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-19  Michael Koch  <konqueror@gmx.de>
+
+       * java/nio/CharBuffer.java
+       (toString): Compile fix.
+
 2003-05-19  Michael Koch  <konqueror@gmx.de>
 
        * gnu/java/nio/ByteBufferImpl.java
index f2fde710417038ba1922f166c538ec2ab1b2572e..9b97b4a6feedb7073449e109bb0b1490c5ddfb07 100644 (file)
@@ -426,7 +426,9 @@ public abstract class CharBuffer extends Buffer
       return new String (array (), position (), length ());
 
     char[] buf = new char [length ()];
-    get (position (), buf);
+    int pos = position ();
+    get (buf, 0, buf.length);
+    position (pos);
     return new String (buf);
   }