NumericShaper allows illegal ranges

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 11, 17, 21, 25
    • Component/s: client-libs
    • 2d
    • 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 after JDK-8365077 but is pre-existing.


            Assignee:
            Philip Race
            Reporter:
            Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: