-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 11, 17, 21, 25
-
Component/s: client-libs
-
b23
public static NumericShaper getContextualShaper(int ranges) {
does not validate the ranges are defined ranges and just silently stores them,
which creates problems later in some cases of hashCode/equals
This in contrast to
public static NumericShaper getShaper(Range singleRange) {
which throws an IllegalArgumentException if the range is not a legal range.
I think that rather than having
public static NumericShaper getContextualShaper(int ranges) {
throw an exception, we can just discard the illegal values. This would be the more compatible change.
Likely this should be specified.
This was noticed afterJDK-8365077 but is pre-existing.
does not validate the ranges are defined ranges and just silently stores them,
which creates problems later in some cases of hashCode/equals
This in contrast to
public static NumericShaper getShaper(Range singleRange) {
which throws an IllegalArgumentException if the range is not a legal range.
I think that rather than having
public static NumericShaper getContextualShaper(int ranges) {
throw an exception, we can just discard the illegal values. This would be the more compatible change.
Likely this should be specified.
This was noticed after
- csr for
-
JDK-8370161 NumericShaper allows illegal ranges
-
- Closed
-
- links to
-
Commit(master)
openjdk/jdk/4b315111
-
Review(master)
openjdk/jdk/27884