-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b116
-
generic
-
generic
-
Verified
Run this test case with jdk7-b100:
import java.text.*;
public class Test {
public static void main(String[] args) {
Collator c = Collator.getInstance();
c.compare("foo", "bar");
c.compare("foo", null);
}
}
and it fails with this:
Exception in thread "main" java.lang.IllegalArgumentException
at sun.text.normalizer.ReplaceableUCharacterIterator.<init>(ReplaceableUCharacterIterator.java:60)
at sun.text.normalizer.UCharacterIterator.getInstance(UCharacterIterator.java:84)
at sun.text.normalizer.NormalizerBase.setText(NormalizerBase.java:1002)
at java.text.CollationElementIterator.setText(CollationElementIterator.java:497)
at java.text.RuleBasedCollator.compare(RuleBasedCollator.java:372)
at Test.main(Test2.java:8)
It shoud of course fail with NullPointerException (not IAE).
import java.text.*;
public class Test {
public static void main(String[] args) {
Collator c = Collator.getInstance();
c.compare("foo", "bar");
c.compare("foo", null);
}
}
and it fails with this:
Exception in thread "main" java.lang.IllegalArgumentException
at sun.text.normalizer.ReplaceableUCharacterIterator.<init>(ReplaceableUCharacterIterator.java:60)
at sun.text.normalizer.UCharacterIterator.getInstance(UCharacterIterator.java:84)
at sun.text.normalizer.NormalizerBase.setText(NormalizerBase.java:1002)
at java.text.CollationElementIterator.setText(CollationElementIterator.java:497)
at java.text.RuleBasedCollator.compare(RuleBasedCollator.java:372)
at Test.main(Test2.java:8)
It shoud of course fail with NullPointerException (not IAE).