diff options
| author | Tom Tromey <tromey@redhat.com> | 2002-07-02 19:43:06 +0000 |
|---|---|---|
| committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-07-02 19:43:06 +0000 |
| commit | aa5661e6b41e781f2e7b6b3e3fc163174f0687a8 (patch) | |
| tree | f83a49525563be9ea4e280422308112655a95719 /libjava/java/text/MessageFormat.java | |
| parent | 40165636b5fb904a609e01051c2ecfd52e5617e3 (diff) | |
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/MessageFormat.java')
| -rw-r--r-- | libjava/java/text/MessageFormat.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libjava/java/text/MessageFormat.java b/libjava/java/text/MessageFormat.java index d31d95b6bea..f5ee3492974 100644 --- a/libjava/java/text/MessageFormat.java +++ b/libjava/java/text/MessageFormat.java @@ -1,5 +1,5 @@ /* MessageFormat.java - Localized message formatting. - Copyright (C) 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -373,17 +373,14 @@ public class MessageFormat extends Format if (formatter instanceof ChoiceFormat) { StringBuffer buf = new StringBuffer (); - // FIXME: don't actually know what is correct here. - // Can a sub-format refer to any argument, or just - // the single argument passed to it? Must test - // against JDK. formatter.format(thisArg, buf, ignore); MessageFormat mf = new MessageFormat (); mf.setLocale(locale); mf.applyPattern(buf.toString()); - formatter = mf; + mf.format(arguments, appendBuf, ignore); } - formatter.format(thisArg, appendBuf, ignore); + else + formatter.format(thisArg, appendBuf, ignore); } appendBuf.append(elements[i].trailer); |
