aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/text/ChoiceFormat.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-07-02 19:43:06 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-07-02 19:43:06 +0000
commitaa5661e6b41e781f2e7b6b3e3fc163174f0687a8 (patch)
treef83a49525563be9ea4e280422308112655a95719 /libjava/java/text/ChoiceFormat.java
parent40165636b5fb904a609e01051c2ecfd52e5617e3 (diff)
downloadgcc-aa5661e6b41e781f2e7b6b3e3fc163174f0687a8.zip
gcc-aa5661e6b41e781f2e7b6b3e3fc163174f0687a8.tar.gz
gcc-aa5661e6b41e781f2e7b6b3e3fc163174f0687a8.tar.bz2
2002-07-02 Tom Tromey <tromey@redhat.com>
David Hovemeyer <daveho@cs.umd.edu> * java/text/ChoiceFormat.java (format(double,StringBuffer,FieldPosition)): Fix fencepost error in check loop. * java/text/MessageFormat.java (format(Object[],StringBuffer,FieldPosition): Pass all arguments to MessageFormat. Co-Authored-By: David Hovemeyer <daveho@cs.umd.edu> From-SVN: r55191
Diffstat (limited to 'libjava/java/text/ChoiceFormat.java')
-rw-r--r--libjava/java/text/ChoiceFormat.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/libjava/java/text/ChoiceFormat.java b/libjava/java/text/ChoiceFormat.java
index 710a725..f7bdde1 100644
--- a/libjava/java/text/ChoiceFormat.java
+++ b/libjava/java/text/ChoiceFormat.java
@@ -1,5 +1,5 @@
/* ChoiceFormat.java -- Format over a range of numbers
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -259,14 +259,12 @@ public class ChoiceFormat extends NumberFormat
if (choiceLimits.length == 0)
return appendBuf;
- int index = 0;
+ int index = 0;
if (! Double.isNaN(num) && num >= choiceLimits[0])
{
for (; index < choiceLimits.length - 1; ++index)
{
- if (choiceLimits[index] <= num
- && index != choiceLimits.length - 2
- && num < choiceLimits[index + 1])
+ if (choiceLimits[index] <= num && num < choiceLimits[index + 1])
break;
}
}