Index: C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/DirectByteBuffer.java =================================================================== --- C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/DirectByteBuffer.java (revision 419772) +++ C:/harmony/trunk_0427/modules/nio/src/main/java/java/nio/DirectByteBuffer.java (working copy) @@ -70,7 +70,7 @@ * @see java.nio.ByteBuffer#get(byte[], int, int) */ public final ByteBuffer get(byte[] 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()) { @@ -106,7 +106,7 @@ } public final double getDouble(int index) { - if (index < 0 || index + 8 > limit) { + if (index < 0 || (long)index + 8 > (long)limit) { throw new IndexOutOfBoundsException(); } return getBaseAddress().getDouble(offset + index, order); @@ -123,7 +123,7 @@ } public final float getFloat(int index) { - if (index < 0 || index + 4 > limit) { + if (index < 0 || (long)index + 4 > (long)limit) { throw new IndexOutOfBoundsException(); } return getBaseAddress().getFloat(offset + index, order); @@ -140,7 +140,7 @@ } public final int getInt(int index) { - if (index < 0 || index + 4 > limit) { + if (index < 0 || (long)index + 4 > (long)limit) { throw new IndexOutOfBoundsException(); } return getBaseAddress().getInt(offset + index, order); @@ -157,7 +157,7 @@ } public final long getLong(int index) { - if (index < 0 || index + 8 > limit) { + if (index < 0 || (long)index + 8 > (long)limit) { throw new IndexOutOfBoundsException(); } return getBaseAddress().getLong(offset + index, order); @@ -174,7 +174,7 @@ } public final short getShort(int index) { - if (index < 0 || index + 2 > limit) { + if (index < 0 || (long)index + 2 > (long)limit) { throw new IndexOutOfBoundsException(); } return getBaseAddress().getShort(offset + index, order);