diff options
Diffstat (limited to 'libjava/java/nio/FloatBufferImpl.java')
-rw-r--r-- | libjava/java/nio/FloatBufferImpl.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libjava/java/nio/FloatBufferImpl.java b/libjava/java/nio/FloatBufferImpl.java index a9eb7c1de8a..6f552cfabe3 100644 --- a/libjava/java/nio/FloatBufferImpl.java +++ b/libjava/java/nio/FloatBufferImpl.java @@ -1,5 +1,5 @@ /* FloatBufferImpl.java -- - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,6 +80,8 @@ final class FloatBufferImpl extends FloatBuffer public FloatBuffer compact () { + checkIfReadOnly(); + mark = -1; int copied = 0; while (remaining () > 0) @@ -89,6 +91,7 @@ final class FloatBufferImpl extends FloatBuffer } position (copied); + limit(capacity()); return this; } @@ -146,7 +149,7 @@ final class FloatBufferImpl extends FloatBuffer } /** - * Absolute put method. Writes <code>value</value> to position + * Absolute put method. Writes <code>value</code> to position * <code>index</code> in the buffer. * * @exception IndexOutOfBoundsException If index is negative or not smaller |