diff options
Diffstat (limited to 'libjava/java/nio')
-rw-r--r-- | libjava/java/nio/ByteBuffer.java | 8 | ||||
-rw-r--r-- | libjava/java/nio/CharBuffer.java | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libjava/java/nio/ByteBuffer.java b/libjava/java/nio/ByteBuffer.java index b3e72aa..5a687ca 100644 --- a/libjava/java/nio/ByteBuffer.java +++ b/libjava/java/nio/ByteBuffer.java @@ -251,7 +251,7 @@ public abstract class ByteBuffer extends Buffer implements Comparable */ public int hashCode() { - // FIXME: Check what SUN calcs here + // FIXME: Check what SUN calculates here return super.hashCode(); } @@ -344,7 +344,8 @@ public abstract class ByteBuffer extends Buffer implements Comparable /** * Absolute get method. * - * @exception IndexOutOfBoundsException FIXME + * @exception IndexOutOfBoundsException If index < 0 or index >= this + * buffers limit. */ public abstract byte get (int index); @@ -352,7 +353,8 @@ public abstract class ByteBuffer extends Buffer implements Comparable * Absolute put method. * * @exception ReadOnlyBufferException If this buffer is read-only - * @exception IndexOutOfBoundsException FIXME + * @exception IndexOutOfBoundsException If index < 0 or index >= this + * buffers limit. */ public abstract ByteBuffer put (int index, byte b); diff --git a/libjava/java/nio/CharBuffer.java b/libjava/java/nio/CharBuffer.java index e5b31b4..e2f8d5e 100644 --- a/libjava/java/nio/CharBuffer.java +++ b/libjava/java/nio/CharBuffer.java @@ -83,6 +83,9 @@ public abstract class CharBuffer extends Buffer */ final public static CharBuffer wrap (CharSequence a, int offset, int length) { + // FIXME: implement better handling of java.lang.String. + // Probably share data with String via reflection. + if ((offset < 0) || (offset > a.length ()) || (length < 0) |