Name: js151677 Date: 07/29/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
In java.text.ChoiceFormat
The method
public void applyPattern(String newPattern) {
does the following on line 184
if (segments[0].equals("")) {
throw new IllegalArgumentException();
But segments[0] is a StringBuffer, and so this test will always be false, as StringBuffer doesn't override equals.
I'm assuming you want
if (segments[0].length() == 0) {
throw new IllegalArgumentException();
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 290249)
======================================================================