This patch backports a number of (largely formatting) cleanups I did on recent Classpath patches in the GCJ merge tree.
ChangeLog: 2008-09-28 Andrew John Hughes <[EMAIL PROTECTED]> * configure.ac: Always check for JAVA prior to ANTLR check. * java/lang/ThreadLocal.java, * java/lang/ThreadLocalMap.java: Rename notFound back to sentinel to avoid potential issues with use of the old name. Cleanup formatting. * java/nio/Buffer.java, * java/nio/ByteBuffer.java, * java/nio/ByteBufferImpl.java, * java/nio/CharBuffer.java, * java/nio/CharViewBufferImpl.java, * java/nio/DirectByteBufferImpl.java, * java/nio/DoubleBuffer.java, * java/nio/DoubleBufferImpl.java, * java/nio/FloatBuffer.java, * java/nio/FloatBufferImpl.java, * java/nio/IntBuffer.java, * java/nio/LongBuffer.java, * java/nio/LongBufferImpl.java, * java/nio/MappedByteBuffer.java, * java/nio/ShortBuffer.java, * java/nio/ShortBufferImpl.java, * java/nio/ShortViewBufferImpl.java: Cleanup formatting. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: configure.ac =================================================================== RCS file: /sources/classpath/classpath/configure.ac,v retrieving revision 1.239 diff -u -u -r1.239 configure.ac --- configure.ac 15 Jul 2008 15:33:51 -0000 1.239 +++ configure.ac 29 Sep 2008 20:41:28 -0000 @@ -942,6 +942,7 @@ AC_PROG_JAVA fi if test "x${COMPILE_GJDOC}" = xyes; then + AC_PROG_JAVA AC_PROG_ANTLR(2,7,1) fi fi Index: java/lang/ThreadLocal.java =================================================================== RCS file: /sources/classpath/classpath/java/lang/ThreadLocal.java,v retrieving revision 1.12 diff -u -u -r1.12 ThreadLocal.java --- java/lang/ThreadLocal.java 10 Sep 2008 01:56:51 -0000 1.12 +++ java/lang/ThreadLocal.java 29 Sep 2008 20:41:34 -0000 @@ -90,7 +90,7 @@ * user. Do not expose this to the public. Package visible for use by * InheritableThreadLocal */ - static final Object notFound = new Object(); + static final Object sentinel = new Object(); /** * The base for the computation of the next hash for a thread local. @@ -100,7 +100,8 @@ /** * Allocate a new hash. */ - private synchronized int computeNextHash() { + private synchronized int computeNextHash() + { return nextHashBase++ * 6709; } @@ -144,7 +145,7 @@ // Note that we don't have to synchronize, as only this thread will // ever modify the map. T value = (T) map.get(this); - if (value == notFound) + if (value == sentinel) { value = initialValue(); map.set(this, value); Index: java/lang/ThreadLocalMap.java =================================================================== RCS file: /sources/classpath/classpath/java/lang/ThreadLocalMap.java,v retrieving revision 1.1 diff -u -u -r1.1 ThreadLocalMap.java --- java/lang/ThreadLocalMap.java 10 Sep 2008 01:56:51 -0000 1.1 +++ java/lang/ThreadLocalMap.java 29 Sep 2008 20:41:34 -0000 @@ -216,7 +216,7 @@ return e.value; } } else { - return ThreadLocal.notFound; + return ThreadLocal.sentinel; } } } Index: java/nio/Buffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/Buffer.java,v retrieving revision 1.18 diff -u -u -r1.18 Buffer.java --- java/nio/Buffer.java 18 Apr 2008 23:23:31 -0000 1.18 +++ java/nio/Buffer.java 29 Sep 2008 20:41:35 -0000 @@ -56,7 +56,8 @@ * * Should be package private. */ - Buffer (int capacity, int limit, int position, int mark, Pointer address) + Buffer (int capacity, int limit, int position, int mark, + Pointer address) { this.address = address; Index: java/nio/ByteBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/ByteBuffer.java,v retrieving revision 1.27 diff -u -u -r1.27 ByteBuffer.java --- java/nio/ByteBuffer.java 18 Apr 2008 23:23:31 -0000 1.27 +++ java/nio/ByteBuffer.java 29 Sep 2008 20:41:35 -0000 @@ -50,7 +50,8 @@ final byte[] backing_buffer; final int array_offset; - ByteBuffer (int capacity, int limit, int position, int mark, Pointer address, byte[] backing_buffer, int array_offset) + ByteBuffer (int capacity, int limit, int position, int mark, + Pointer address, byte[] backing_buffer, int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; Index: java/nio/ByteBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/ByteBufferImpl.java,v retrieving revision 1.16 diff -u -u -r1.16 ByteBufferImpl.java --- java/nio/ByteBufferImpl.java 18 Apr 2008 23:23:31 -0000 1.16 +++ java/nio/ByteBufferImpl.java 29 Sep 2008 20:41:35 -0000 @@ -45,7 +45,8 @@ { private final boolean readOnly; - ByteBufferImpl (byte[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + ByteBufferImpl (byte[] buffer, int offset, int capacity, int limit, + int position, int mark, boolean readOnly) { super (capacity, limit, position, mark, null, buffer, offset); this.readOnly = readOnly; @@ -88,17 +89,20 @@ public ByteBuffer slice () { - return new ByteBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + return new ByteBufferImpl (backing_buffer, array_offset + position (), + remaining (), remaining (), 0, -1, isReadOnly ()); } public ByteBuffer duplicate () { - return new ByteBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + return new ByteBufferImpl (backing_buffer, array_offset, capacity (), + limit (), position (), mark, isReadOnly ()); } public ByteBuffer asReadOnlyBuffer () { - return new ByteBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + return new ByteBufferImpl (backing_buffer, array_offset, capacity (), + limit (), position (), mark, true); } void shiftDown (int dst_offset, int src_offset, int count) Index: java/nio/CharBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/CharBuffer.java,v retrieving revision 1.29 diff -u -u -r1.29 CharBuffer.java --- java/nio/CharBuffer.java 18 Apr 2008 23:23:32 -0000 1.29 +++ java/nio/CharBuffer.java 29 Sep 2008 20:41:35 -0000 @@ -38,9 +38,10 @@ package java.nio; -import java.io.IOException; import gnu.classpath.Pointer; +import java.io.IOException; + /** * @since 1.4 */ @@ -50,7 +51,8 @@ final int array_offset; final char[] backing_buffer; - CharBuffer (int capacity, int limit, int position, int mark, Pointer address, char[] backing_buffer, int array_offset) + CharBuffer (int capacity, int limit, int position, int mark, + Pointer address, char[] backing_buffer, int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; @@ -80,7 +82,8 @@ */ public static final CharBuffer wrap(char[] array, int offset, int length) { - return new CharBufferImpl(array, 0, array.length, offset + length, offset, -1, false); + return new CharBufferImpl(array, 0, array.length, offset + length, offset, + -1, false); } /** Index: java/nio/CharViewBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/CharViewBufferImpl.java,v retrieving revision 1.9 diff -u -u -r1.9 CharViewBufferImpl.java --- java/nio/CharViewBufferImpl.java 18 Apr 2008 23:23:32 -0000 1.9 +++ java/nio/CharViewBufferImpl.java 29 Sep 2008 20:41:35 -0000 @@ -49,7 +49,8 @@ CharViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1, bb.isDirect() ? - VMDirectByteBuffer.adjustAddress(bb.address, bb.position()) : null, null, 0); + VMDirectByteBuffer.adjustAddress(bb.address, bb.position()) : null, + null, 0); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); @@ -61,7 +62,8 @@ boolean readOnly, ByteOrder endian) { super (capacity, limit, position, mark, bb.isDirect() ? - VMDirectByteBuffer.adjustAddress(bb.address, offset) : null, null, 0); + VMDirectByteBuffer.adjustAddress(bb.address, offset) : null, + null, 0); this.bb = bb; this.offset = offset; this.readOnly = readOnly; Index: java/nio/DirectByteBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/DirectByteBufferImpl.java,v retrieving revision 1.23 diff -u -u -r1.23 DirectByteBufferImpl.java --- java/nio/DirectByteBufferImpl.java 18 Apr 2008 23:23:32 -0000 1.23 +++ java/nio/DirectByteBufferImpl.java 29 Sep 2008 20:41:35 -0000 @@ -1,4 +1,4 @@ -/* DirectByteBufferImpl.java -- +/* DirectByteBufferImpl.java -- Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,8 +60,8 @@ static final class ReadOnly extends DirectByteBufferImpl { ReadOnly(Object owner, Pointer address, - int capacity, int limit, - int position) + int capacity, int limit, + int position) { super(owner, address, capacity, limit, position); } @@ -89,9 +89,14 @@ super(capacity); } + ReadWrite(Pointer address, int capacity) + { + super(address, capacity); + } + ReadWrite(Object owner, Pointer address, - int capacity, int limit, - int position) + int capacity, int limit, + int position) { super(owner, address, capacity, limit, position); } @@ -104,13 +109,20 @@ DirectByteBufferImpl(int capacity) { - super(capacity, capacity, 0, -1, VMDirectByteBuffer.allocate(capacity), null, 0); + super(capacity, capacity, 0, -1, + VMDirectByteBuffer.allocate(capacity), null, 0); this.owner = this; } + DirectByteBufferImpl(Pointer address, int capacity) + { + super(capacity, capacity, 0, -1, address, null, 0); + this.owner = null; + } + DirectByteBufferImpl(Object owner, Pointer address, - int capacity, int limit, - int position) + int capacity, int limit, + int position) { super(capacity, limit, position, -1, address, null, 0); this.owner = owner; @@ -118,7 +130,7 @@ /** * Allocates a new direct byte buffer. - */ + */ public static ByteBuffer allocate(int capacity) { return new DirectByteBufferImpl.ReadWrite(capacity); @@ -129,7 +141,7 @@ if (owner == this) VMDirectByteBuffer.free(address); } - + public byte get() { checkForUnderflow(); @@ -168,7 +180,7 @@ position(pos + 1); return this; } - + public ByteBuffer put(int index, byte value) { checkIndex(index); @@ -176,24 +188,23 @@ VMDirectByteBuffer.put(address, index, value); return this; } - + public ByteBuffer put (byte[] src, int offset, int length) { checkArraySize (src.length, offset, length); checkForUnderflow (length); - int index = position (); VMDirectByteBuffer.put (address, index, src, offset, length); position (index + length); - + return this; } - + void shiftDown(int dst_offset, int src_offset, int count) { VMDirectByteBuffer.shiftDown(address, dst_offset, src_offset, count); } - + public ByteBuffer compact() { checkIfReadOnly(); @@ -201,15 +212,15 @@ int pos = position(); if (pos > 0) { - int count = remaining(); - VMDirectByteBuffer.shiftDown(address, 0, pos, count); - position(count); - limit(capacity()); + int count = remaining(); + VMDirectByteBuffer.shiftDown(address, 0, pos, count); + position(count); + limit(capacity()); } else { - position(limit()); - limit(capacity()); + position(limit()); + limit(capacity()); } return this; } @@ -244,9 +255,9 @@ if (mark != pos) { - result.position(mark); - result.mark(); - result.position(pos); + result.position(mark); + result.mark(); + result.position(pos); } return result; } @@ -300,18 +311,18 @@ { return ByteBufferHelper.getChar(this, order()); } - + public ByteBuffer putChar(char value) { ByteBufferHelper.putChar(this, value, order()); return this; } - + public char getChar(int index) { return ByteBufferHelper.getChar(this, index, order()); } - + public ByteBuffer putChar(int index, char value) { ByteBufferHelper.putChar(this, index, value, order()); @@ -322,18 +333,18 @@ { return ByteBufferHelper.getShort(this, order()); } - + public ByteBuffer putShort(short value) { ByteBufferHelper.putShort(this, value, order()); return this; } - + public short getShort(int index) { return ByteBufferHelper.getShort(this, index, order()); } - + public ByteBuffer putShort(int index, short value) { ByteBufferHelper.putShort(this, index, value, order()); @@ -344,18 +355,18 @@ { return ByteBufferHelper.getInt(this, order()); } - + public ByteBuffer putInt(int value) { ByteBufferHelper.putInt(this, value, order()); return this; } - + public int getInt(int index) { return ByteBufferHelper.getInt(this, index, order()); } - + public ByteBuffer putInt(int index, int value) { ByteBufferHelper.putInt(this, index, value, order()); @@ -366,18 +377,18 @@ { return ByteBufferHelper.getLong(this, order()); } - + public ByteBuffer putLong(long value) { ByteBufferHelper.putLong(this, value, order()); return this; } - + public long getLong(int index) { return ByteBufferHelper.getLong(this, index, order()); } - + public ByteBuffer putLong(int index, long value) { ByteBufferHelper.putLong(this, index, value, order()); @@ -388,13 +399,13 @@ { return ByteBufferHelper.getFloat(this, order()); } - + public ByteBuffer putFloat(float value) { ByteBufferHelper.putFloat(this, value, order()); return this; } - + public float getFloat(int index) { return ByteBufferHelper.getFloat(this, index, order()); @@ -416,12 +427,12 @@ ByteBufferHelper.putDouble(this, value, order()); return this; } - + public double getDouble(int index) { return ByteBufferHelper.getDouble(this, index, order()); } - + public ByteBuffer putDouble(int index, double value) { ByteBufferHelper.putDouble(this, index, value, order()); Index: java/nio/DoubleBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/DoubleBuffer.java,v retrieving revision 1.22 diff -u -u -r1.22 DoubleBuffer.java --- java/nio/DoubleBuffer.java 18 Apr 2008 23:23:32 -0000 1.22 +++ java/nio/DoubleBuffer.java 29 Sep 2008 20:41:35 -0000 @@ -49,7 +49,8 @@ final int array_offset; final double[] backing_buffer; - DoubleBuffer (int capacity, int limit, int position, int mark, Pointer address, double[] backing_buffer, int array_offset) + DoubleBuffer (int capacity, int limit, int position, int mark, + Pointer address, double[] backing_buffer, int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; Index: java/nio/DoubleBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/DoubleBufferImpl.java,v retrieving revision 1.11 diff -u -u -r1.11 DoubleBufferImpl.java --- java/nio/DoubleBufferImpl.java 18 Apr 2008 23:23:32 -0000 1.11 +++ java/nio/DoubleBufferImpl.java 29 Sep 2008 20:41:36 -0000 @@ -50,7 +50,8 @@ this (new double [capacity], 0, capacity, capacity, 0, -1, false); } - DoubleBufferImpl (double[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + DoubleBufferImpl (double[] buffer, int offset, int capacity, int limit, + int position, int mark, boolean readOnly) { super (capacity, limit, position, mark, null, buffer, offset); this.readOnly = readOnly; @@ -63,17 +64,20 @@ public DoubleBuffer slice () { - return new DoubleBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + return new DoubleBufferImpl (backing_buffer, array_offset + position (), + remaining (), remaining (), 0, -1, isReadOnly ()); } public DoubleBuffer duplicate () { - return new DoubleBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + return new DoubleBufferImpl (backing_buffer, array_offset, capacity (), + limit (), position (), mark, isReadOnly ()); } public DoubleBuffer asReadOnlyBuffer () { - return new DoubleBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + return new DoubleBufferImpl (backing_buffer, array_offset, capacity (), + limit (), position (), mark, true); } public DoubleBuffer compact () Index: java/nio/FloatBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/FloatBuffer.java,v retrieving revision 1.22 diff -u -u -r1.22 FloatBuffer.java --- java/nio/FloatBuffer.java 18 Apr 2008 23:23:33 -0000 1.22 +++ java/nio/FloatBuffer.java 29 Sep 2008 20:41:36 -0000 @@ -49,7 +49,8 @@ final int array_offset; final float[] backing_buffer; - FloatBuffer (int capacity, int limit, int position, int mark, Pointer address, float[] backing_buffer, int array_offset) + FloatBuffer (int capacity, int limit, int position, int mark, + Pointer address, float[] backing_buffer, int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; Index: java/nio/FloatBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/FloatBufferImpl.java,v retrieving revision 1.11 diff -u -u -r1.11 FloatBufferImpl.java --- java/nio/FloatBufferImpl.java 18 Apr 2008 23:23:33 -0000 1.11 +++ java/nio/FloatBufferImpl.java 29 Sep 2008 20:41:36 -0000 @@ -50,7 +50,8 @@ this (new float [capacity], 0, capacity, capacity, 0, -1, false); } - FloatBufferImpl (float[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + FloatBufferImpl (float[] buffer, int offset, int capacity, int limit, + int position, int mark, boolean readOnly) { super (capacity, limit, position, mark, null, buffer, offset); this.readOnly = readOnly; Index: java/nio/IntBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/IntBuffer.java,v retrieving revision 1.22 diff -u -u -r1.22 IntBuffer.java --- java/nio/IntBuffer.java 18 Apr 2008 23:23:33 -0000 1.22 +++ java/nio/IntBuffer.java 29 Sep 2008 20:41:36 -0000 @@ -49,7 +49,8 @@ final int array_offset; final int[] backing_buffer; - IntBuffer (int capacity, int limit, int position, int mark, Pointer address, int[] backing_buffer, int array_offset) + IntBuffer (int capacity, int limit, int position, int mark, + Pointer address, int[] backing_buffer, int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; @@ -73,7 +74,8 @@ */ public static final IntBuffer wrap (int[] array, int offset, int length) { - return new IntBufferImpl (array, 0, array.length, offset + length, offset, -1, false); + return new IntBufferImpl (array, 0, array.length, offset + length, offset, + -1, false); } /** Index: java/nio/LongBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/LongBuffer.java,v retrieving revision 1.22 diff -u -u -r1.22 LongBuffer.java --- java/nio/LongBuffer.java 18 Apr 2008 23:23:33 -0000 1.22 +++ java/nio/LongBuffer.java 29 Sep 2008 20:41:36 -0000 @@ -49,7 +49,8 @@ final int array_offset; final long[] backing_buffer; - LongBuffer (int capacity, int limit, int position, int mark, Pointer address, long[] backing_buffer, int array_offset) + LongBuffer (int capacity, int limit, int position, int mark, + Pointer address, long[] backing_buffer, int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; Index: java/nio/LongBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/LongBufferImpl.java,v retrieving revision 1.11 diff -u -u -r1.11 LongBufferImpl.java --- java/nio/LongBufferImpl.java 18 Apr 2008 23:23:33 -0000 1.11 +++ java/nio/LongBufferImpl.java 29 Sep 2008 20:41:36 -0000 @@ -50,7 +50,8 @@ this (new long [capacity], 0, capacity, capacity, 0, -1, false); } - LongBufferImpl (long[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + LongBufferImpl (long[] buffer, int offset, int capacity, int limit, + int position, int mark, boolean readOnly) { super (capacity, limit, position, mark, null, buffer, offset); this.readOnly = readOnly; @@ -63,17 +64,20 @@ public LongBuffer slice () { - return new LongBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + return new LongBufferImpl (backing_buffer, array_offset + position (), + remaining (), remaining (), 0, -1, isReadOnly ()); } public LongBuffer duplicate () { - return new LongBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + return new LongBufferImpl (backing_buffer, array_offset, capacity (), limit (), + position (), mark, isReadOnly ()); } public LongBuffer asReadOnlyBuffer () { - return new LongBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + return new LongBufferImpl (backing_buffer, array_offset, capacity (), limit (), + position (), mark, true); } public LongBuffer compact () Index: java/nio/MappedByteBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/MappedByteBuffer.java,v retrieving revision 1.15 diff -u -u -r1.15 MappedByteBuffer.java --- java/nio/MappedByteBuffer.java 18 Apr 2008 23:23:33 -0000 1.15 +++ java/nio/MappedByteBuffer.java 29 Sep 2008 20:41:36 -0000 @@ -46,7 +46,8 @@ */ public abstract class MappedByteBuffer extends ByteBuffer { - MappedByteBuffer (int capacity, int limit, int position, int mark, Pointer address) + MappedByteBuffer (int capacity, int limit, int position, int mark, + Pointer address) { super (capacity, limit, position, mark, address, null, 0); } Index: java/nio/ShortBuffer.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/ShortBuffer.java,v retrieving revision 1.23 diff -u -u -r1.23 ShortBuffer.java --- java/nio/ShortBuffer.java 18 Apr 2008 23:23:33 -0000 1.23 +++ java/nio/ShortBuffer.java 29 Sep 2008 20:41:37 -0000 @@ -49,7 +49,9 @@ final int array_offset; final short[] backing_buffer; - ShortBuffer (int capacity, int limit, int position, int mark, Pointer address, short[] backing_buffer, int array_offset) + ShortBuffer (int capacity, int limit, int position, + int mark, Pointer address, short[] backing_buffer, + int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; Index: java/nio/ShortBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/ShortBufferImpl.java,v retrieving revision 1.11 diff -u -u -r1.11 ShortBufferImpl.java --- java/nio/ShortBufferImpl.java 18 Apr 2008 23:23:34 -0000 1.11 +++ java/nio/ShortBufferImpl.java 29 Sep 2008 20:41:37 -0000 @@ -50,7 +50,8 @@ this (new short [capacity], 0, capacity, capacity, 0, -1, false); } - ShortBufferImpl (short[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + ShortBufferImpl (short[] buffer, int offset, int capacity, + int limit, int position, int mark, boolean readOnly) { super (capacity, limit, position, mark, null, buffer, offset); this.readOnly = readOnly; @@ -63,17 +64,20 @@ public ShortBuffer slice () { - return new ShortBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + return new ShortBufferImpl (backing_buffer, array_offset + position (), + remaining (), remaining (), 0, -1, isReadOnly ()); } public ShortBuffer duplicate () { - return new ShortBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + return new ShortBufferImpl (backing_buffer, array_offset, capacity (), + limit (), position (), mark, isReadOnly ()); } public ShortBuffer asReadOnlyBuffer () { - return new ShortBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + return new ShortBufferImpl (backing_buffer, array_offset, capacity (), limit (), + position (), mark, true); } public ShortBuffer compact () Index: java/nio/ShortViewBufferImpl.java =================================================================== RCS file: /sources/classpath/classpath/java/nio/ShortViewBufferImpl.java,v retrieving revision 1.10 diff -u -u -r1.10 ShortViewBufferImpl.java --- java/nio/ShortViewBufferImpl.java 18 Apr 2008 23:23:34 -0000 1.10 +++ java/nio/ShortViewBufferImpl.java 29 Sep 2008 20:41:37 -0000 @@ -49,7 +49,8 @@ ShortViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1, bb.isDirect() ? - VMDirectByteBuffer.adjustAddress(bb.address, bb.position()):null, null, 0); + VMDirectByteBuffer.adjustAddress(bb.address, bb.position()):null, + null, 0); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); @@ -61,7 +62,8 @@ boolean readOnly, ByteOrder endian) { super (capacity, limit, position, mark, bb.isDirect() ? - VMDirectByteBuffer.adjustAddress(bb.address, offset):null, null, 0); + VMDirectByteBuffer.adjustAddress(bb.address, offset):null, + null, 0); this.bb = bb; this.offset = offset; this.readOnly = readOnly;