summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/util/Collections.java
diff options
context:
space:
mode:
authorMark Wielaard <mark@gcc.gnu.org>2006-01-17 18:09:40 +0000
committerMark Wielaard <mark@gcc.gnu.org>2006-01-17 18:09:40 +0000
commit2127637945ea6b763966398130e0770fa993c860 (patch)
treec976ca91e3ef0bda3b34b37c0195145638d8d08e /libjava/classpath/java/util/Collections.java
parentbcb36c3e02e3bd2843aad1b9888513dfb5d6e337 (diff)
Imported GNU Classpath 0.20
Imported GNU Classpath 0.20 * Makefile.am (AM_CPPFLAGS): Add classpath/include. * java/nio/charset/spi/CharsetProvider.java: New override file. * java/security/Security.java: Likewise. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r109831
Diffstat (limited to 'libjava/classpath/java/util/Collections.java')
-rw-r--r--libjava/classpath/java/util/Collections.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/libjava/classpath/java/util/Collections.java b/libjava/classpath/java/util/Collections.java
index e650bf8bda9..dc37bad8a93 100644
--- a/libjava/classpath/java/util/Collections.java
+++ b/libjava/classpath/java/util/Collections.java
@@ -670,10 +670,10 @@ public class Collections
for ( ; i != pos; i--, o = itr.previous());
forward = false;
}
- final int d = compare(key, o, c);
+ final int d = compare(o, key, c);
if (d == 0)
return pos;
- else if (d < 0)
+ else if (d > 0)
hi = pos - 1;
else
// This gets the insertion point right on the last loop
@@ -685,10 +685,10 @@ public class Collections
while (low <= hi)
{
pos = (low + hi) >> 1;
- final int d = compare(key, l.get(pos), c);
+ final int d = compare(l.get(pos), key, c);
if (d == 0)
return pos;
- else if (d < 0)
+ else if (d > 0)
hi = pos - 1;
else
// This gets the insertion point right on the last loop