Index: C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/ShortBuffer.java =================================================================== --- C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/ShortBuffer.java (revision 419837) +++ C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/ShortBuffer.java (working copy) @@ -88,7 +88,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(); } @@ -306,7 +306,7 @@ * remaining() */ public ShortBuffer get(short[] 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(); } if (len > remaining()) { @@ -467,7 +467,7 @@ * If no changes may be made to the contents of this buffer */ public ShortBuffer put(short[] 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(); }