commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug #777] bug in java.text.MessageFormat.format(Object[], StringBuffer,


From: nobody
Subject: [Bug #777] bug in java.text.MessageFormat.format(Object[], StringBuffer, FieldPosition)
Date: Fri, 28 Jun 2002 16:41:14 -0400

=================== BUG #777: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=777&group_id=85

Submitted by: None                      Project: classpath                      
Submitted on: 2002-Jun-28 16:41
Severity:  5 - Major                    Resolution:  None                       
Assigned to:  None                      Status:  Open                           
Platform Version:  Red Hat 7.x          

Summary:  bug in java.text.MessageFormat.format(Object[], StringBuffer, 
FieldPosition)

Original Submission:  A spurious IllegalArgumentException is thrown if there 
are multiple ChoiceFormats in the pattern.  I've attached a test program which 
reproduces the bug.  Here is a patch to (hopefully) fix the problem:

diff -u -r1.1 MessageFormat.java
--- MessageFormat.java  2002/06/24 13:56:20     1.1
+++ MessageFormat.java  2002/06/28 20:34:52
@@ -381,9 +381,10 @@
                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);




No Followups Have Been Posted




No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=777&group_id=85



reply via email to

[Prev in Thread] Current Thread [Next in Thread]