Index: C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/CharBuffer.java =================================================================== --- C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/CharBuffer.java (revision 419837) +++ C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/CharBuffer.java (working copy) @@ -94,7 +94,7 @@ if (array == null) { throw new NullPointerException(); } - if ((start < 0 ) || (len < 0) || start + len > array.length) { + if ((start < 0 ) || (len < 0) || (long)start + (long)len > (long)array.length) { throw new IndexOutOfBoundsException(); } @@ -381,7 +381,7 @@ * remaining() */ public CharBuffer get(char[] dest, int off, int len) { - if ((off < 0 ) || (len < 0) || off + len > dest.length) { + if ((off < 0 ) || (len < 0) || (long)off + (long)len > (long)dest.length) { throw new IndexOutOfBoundsException(); } @@ -552,7 +552,7 @@ * If no changes may be made to the contents of this buffer */ public CharBuffer put(char[] src, int off, int len) { - if ((off < 0 ) || (len < 0) || off + len > src.length) { + if ((off < 0 ) || (len < 0) || (long)off + (long)len > (long)src.length) { throw new IndexOutOfBoundsException(); }