[Top][All Lists]
[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 17:01:46 -0400 |
=================== BUG #777: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=777&group_id=85
Changes by: Tom Tromey <address@hidden>
Date: 2002-Jun-28 21:01 (GMT)
------------------ Additional Follow-up Comments ----------------------------
I don't see the test program.
Could you send it?
=================== BUG #777: FULL BUG SNAPSHOT ===================
Submitted by: None Project: classpath
Submitted on: 2002-Jun-28 20: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);
Follow-up Comments
*******************
-------------------------------------------------------
Date: 2002-Jun-28 21:01 By: tromey
I don't see the test program.
Could you send it?
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=777&group_id=85