Index: java/nio/ByteBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/ByteBufferImpl.java,v retrieving revision 1.7 diff -u -r1.7 ByteBufferImpl.java --- java/nio/ByteBufferImpl.java 16 Jun 2004 08:57:10 -0000 1.7 +++ java/nio/ByteBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -112,6 +112,8 @@ public ByteBuffer compact () { + checkIfReadOnly(); + mark = -1; int pos = position(); if (pos > 0) { Index: java/nio/CharBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/CharBufferImpl.java,v retrieving revision 1.5 diff -u -r1.5 CharBufferImpl.java --- java/nio/CharBufferImpl.java 16 Jun 2004 08:57:10 -0000 1.5 +++ java/nio/CharBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -87,6 +87,8 @@ public CharBuffer compact () { + checkIfReadOnly(); + mark = -1; int copied = 0; while (remaining () > 0) Index: java/nio/DirectByteBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/DirectByteBufferImpl.java,v retrieving revision 1.14 diff -u -r1.14 DirectByteBufferImpl.java --- java/nio/DirectByteBufferImpl.java 21 Nov 2004 12:03:54 -0000 1.14 +++ java/nio/DirectByteBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -186,6 +186,8 @@ public ByteBuffer compact() { + checkIfReadOnly(); + mark = -1; int pos = position(); if (pos > 0) { Index: java/nio/DoubleBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/DoubleBufferImpl.java,v retrieving revision 1.5 diff -u -r1.5 DoubleBufferImpl.java --- java/nio/DoubleBufferImpl.java 16 Jun 2004 08:57:10 -0000 1.5 +++ java/nio/DoubleBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -80,6 +80,8 @@ public DoubleBuffer compact () { + checkIfReadOnly(); + mark = -1; int copied = 0; while (remaining () > 0) Index: java/nio/FloatBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/FloatBufferImpl.java,v retrieving revision 1.5 diff -u -r1.5 FloatBufferImpl.java --- java/nio/FloatBufferImpl.java 16 Jun 2004 08:57:10 -0000 1.5 +++ java/nio/FloatBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -80,6 +80,8 @@ public FloatBuffer compact () { + checkIfReadOnly(); + mark = -1; int copied = 0; while (remaining () > 0) Index: java/nio/IntBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/IntBufferImpl.java,v retrieving revision 1.5 diff -u -r1.5 IntBufferImpl.java --- java/nio/IntBufferImpl.java 16 Jun 2004 08:57:10 -0000 1.5 +++ java/nio/IntBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -80,6 +80,8 @@ public IntBuffer compact () { + checkIfReadOnly(); + mark = -1; int copied = 0; while (remaining () > 0) Index: java/nio/LongBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/LongBufferImpl.java,v retrieving revision 1.5 diff -u -r1.5 LongBufferImpl.java --- java/nio/LongBufferImpl.java 16 Jun 2004 08:57:10 -0000 1.5 +++ java/nio/LongBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -80,6 +80,8 @@ public LongBuffer compact () { + checkIfReadOnly(); + mark = -1; int copied = 0; while (remaining () > 0) Index: java/nio/MappedByteBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/MappedByteBufferImpl.java,v retrieving revision 1.13 diff -u -r1.13 MappedByteBufferImpl.java --- java/nio/MappedByteBufferImpl.java 21 Nov 2004 12:03:54 -0000 1.13 +++ java/nio/MappedByteBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -118,6 +118,8 @@ public ByteBuffer compact() { + checkIfReadOnly(); + mark = -1; int pos = position(); if (pos > 0) { Index: java/nio/ShortBufferImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/nio/ShortBufferImpl.java,v retrieving revision 1.5 diff -u -r1.5 ShortBufferImpl.java --- java/nio/ShortBufferImpl.java 16 Jun 2004 08:57:10 -0000 1.5 +++ java/nio/ShortBufferImpl.java 27 Dec 2004 14:28:28 -0000 @@ -80,6 +80,8 @@ public ShortBuffer compact () { + checkIfReadOnly(); + mark = -1; int copied = 0; while (remaining () > 0)