Name: avC70361 Date: 12/04/97
The java.text.Collator.setStrength(int) method throws IllegalArgumentException
when called with Collator.IDENTICAL as a parameter. But the JDK1.2 API
documentation states that java.text.Collator.setStrength(int newStrength) throws
IllegalArgumentException if the newStrength is not one of the PRIMARY,
SECONDARY, TERTIARY or IDENTICAL.
Here is the test demonstrating the bug:
-----------CollatorTest.java---------
import java.text.Collator;
public class CollatorTest {
public static void main(String args[]) {
Collator collator = Collator.getInstance();
collator.setStrength(Collator.IDENTICAL);
}
}
----------The test output------------
#>java CollatorTest
java.lang.IllegalArgumentException: Incorrect comparison level.
at java.text.Collator.setStrength(Collator.java:355)
at CollatorTest.main(CollatorTest.java:7)
-------------------------------------
======================================================================