diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
| commit | 65bf3316cf384588453604be6b4f0ed3751a8b0f (patch) | |
| tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/java/nio/ShortBuffer.java | |
| parent | 8fc56618a84446beccd45b80381cdfe0e94050df (diff) | |
| download | gcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.tar.gz | |
Merged gcj-eclipse branch to trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/nio/ShortBuffer.java')
| -rw-r--r-- | libjava/classpath/java/nio/ShortBuffer.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libjava/classpath/java/nio/ShortBuffer.java b/libjava/classpath/java/nio/ShortBuffer.java index 958fe8cd6b6..33e458a4b1e 100644 --- a/libjava/classpath/java/nio/ShortBuffer.java +++ b/libjava/classpath/java/nio/ShortBuffer.java @@ -1,5 +1,5 @@ /* ShortBuffer.java -- - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,7 +42,7 @@ package java.nio; * @since 1.4 */ public abstract class ShortBuffer extends Buffer - implements Comparable + implements Comparable<ShortBuffer> { int array_offset; short[] backing_buffer; @@ -273,7 +273,7 @@ public abstract class ShortBuffer extends Buffer { if (obj instanceof ShortBuffer) { - return compareTo (obj) == 0; + return compareTo ((ShortBuffer) obj) == 0; } return false; @@ -285,10 +285,8 @@ public abstract class ShortBuffer extends Buffer * @exception ClassCastException If obj is not an object derived from * <code>ShortBuffer</code>. */ - public int compareTo (Object obj) + public int compareTo (ShortBuffer other) { - ShortBuffer other = (ShortBuffer) obj; - int num = Math.min(remaining(), other.remaining()); int pos_this = position(); int pos_other = other.position(); |
