-
Type:
CSR
-
Resolution: Approved
-
Priority:
P4
-
Component/s: client-libs
-
None
-
behavioral
-
low
-
-
Java API
-
SE
Summary
Specify that for the factory methods of java.awt.font.NumericShaper, illegal values and values that are of lesser precedence are discarded. The implementation is updated where necessary to discard these.
Problem
When using Set<Range> no illegal values are possible and values of lesser precedence are discarded. However this latter point is undocumented. For the construction using a bitmask, the latter also needs documenting, but in addition and contrary to what anyone would expect, illegal values are stored and used in calculations for hashCode which create inconsistencies with hashCode.
Solution
Specify that illegal values are discarded, and that values of lesser precedence are also discarded. The implementation is updated where necessary to discard these.
Specification
<pre> public class java.awt.font.NumericShaper + * Any bit set in the {@code ranges} bitmask which is not a + * recognised value is discarded. Similarly if two bits are + * specified where one takes precedence, the lesser one is discarded. public static NumericShaper getContextualShaper(int ranges) + * If two ranges are specified where one takes precedence over the + * other the lesser range is discarded. public static NumericShaper getContextualShaper(Set<Range> ranges) + * If two ranges are specified where one takes precedence over the + * other the lesser range is discarded. public static NumericShaper getContextualShaper(Set<Range> ranges, Range defaultContext) </pre>
- csr of
-
JDK-8370160 NumericShaper allows illegal ranges
-
- Resolved
-