-
Bug
-
Resolution: Unresolved
-
P4
-
8, 11, 17, 21, 24, 26
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
I get two NumericShapers, they are equal, but have different hashCode.
---------- BEGIN SOURCE ----------
import java.awt.font.NumericShaper;
import java.util.EnumSet;
import static java.awt.font.NumericShaper.*;
public class EqualsTest {
public static void main(String[] args) {
NumericShaper ns1 = getContextualShaper(ARABIC | TAMIL, TAMIL);
NumericShaper ns2 = getContextualShaper(
EnumSet.of(Range.ARABIC, Range.TAMIL),
Range.TAMIL);
if (ns1.equals(ns2) && ns1.hashCode() != ns2.hashCode()) {
throw new RuntimeException("ns1 and ns2 have different hash codes: "
+ ns1.hashCode() + " vs " + ns2.hashCode());
}
}
}
---------- END SOURCE ----------
I get two NumericShapers, they are equal, but have different hashCode.
---------- BEGIN SOURCE ----------
import java.awt.font.NumericShaper;
import java.util.EnumSet;
import static java.awt.font.NumericShaper.*;
public class EqualsTest {
public static void main(String[] args) {
NumericShaper ns1 = getContextualShaper(ARABIC | TAMIL, TAMIL);
NumericShaper ns2 = getContextualShaper(
EnumSet.of(Range.ARABIC, Range.TAMIL),
Range.TAMIL);
if (ns1.equals(ns2) && ns1.hashCode() != ns2.hashCode()) {
throw new RuntimeException("ns1 and ns2 have different hash codes: "
+ ns1.hashCode() + " vs " + ns2.hashCode());
}
}
}
---------- END SOURCE ----------