From 97b8365cafc3a344a22d3980b8ed885f5c6d8357 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 9 Jan 2007 19:58:05 +0000 Subject: Merged gcj-eclipse branch to trunk. From-SVN: r120621 --- libjava/classpath/java/nio/DoubleBuffer.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libjava/classpath/java/nio/DoubleBuffer.java') diff --git a/libjava/classpath/java/nio/DoubleBuffer.java b/libjava/classpath/java/nio/DoubleBuffer.java index 381bb71..be7861c 100644 --- a/libjava/classpath/java/nio/DoubleBuffer.java +++ b/libjava/classpath/java/nio/DoubleBuffer.java @@ -1,5 +1,5 @@ /* DoubleBuffer.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 DoubleBuffer extends Buffer - implements Comparable + implements Comparable { int array_offset; double[] backing_buffer; @@ -273,7 +273,7 @@ public abstract class DoubleBuffer extends Buffer { if (obj instanceof DoubleBuffer) { - return compareTo (obj) == 0; + return compareTo ((DoubleBuffer) obj) == 0; } return false; @@ -285,10 +285,8 @@ public abstract class DoubleBuffer extends Buffer * @exception ClassCastException If obj is not an object derived from * DoubleBuffer. */ - public int compareTo (Object obj) + public int compareTo (DoubleBuffer other) { - DoubleBuffer other = (DoubleBuffer) obj; - int num = Math.min(remaining(), other.remaining()); int pos_this = position(); int pos_other = other.position(); -- cgit v1.1