Index: C:/harmony/trunk_0427/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/ByteBufferTest.java =================================================================== --- C:/harmony/trunk_0427/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/ByteBufferTest.java (revision 419772) +++ C:/harmony/trunk_0427/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/ByteBufferTest.java (working copy) @@ -1174,6 +1174,12 @@ } buf.order(ByteOrder.BIG_ENDIAN); + + try { + ByteBuffer.allocateDirect(16).putChar(Integer.MAX_VALUE, 'h'); + } catch (IndexOutOfBoundsException e) { + //expected + } } public void testGetDouble() { @@ -1237,6 +1243,12 @@ } buf.order(ByteOrder.BIG_ENDIAN); + + try { + ByteBuffer.allocateDirect(16).getDouble(Integer.MAX_VALUE); + } catch (IndexOutOfBoundsException e) { + //expected + } } public void testPutDouble() { @@ -1517,6 +1529,11 @@ } buf.order(ByteOrder.BIG_ENDIAN); + try { + ByteBuffer.allocateDirect(16).getInt(Integer.MAX_VALUE); + } catch (IndexOutOfBoundsException e) { + //expected + } } public void testPutInt() {