code: @Override
      public void setMaximumFractionDigits(int newValue) {
          maximumFractionDigits = Math.min(Math.max(0, newValue), MAXIMUM_FRACTION_DIGITS);
          super.setMaximumFractionDigits((maximumFractionDigits > DOUBLE_FRACTION_DIGITS) ?
              DOUBLE_FRACTION_DIGITS : maximumFractionDigits);
          if (minimumFractionDigits > maximumFractionDigits) {
              minimumFractionDigits = maximumFractionDigits;
              super.setMinimumFractionDigits((minimumFractionDigits > DOUBLE_FRACTION_DIGITS) ?
                  DOUBLE_FRACTION_DIGITS : minimumFractionDigits);
          }
          fastPathCheckNeeded = true;
      }
docs: Sets the maximum number of digits allowed in the fraction portion of a
  number.
  For formatting numbers other than <code>BigInteger</code> and
  <code>BigDecimal</code> objects, the lower of <code>newValue</code> and
  340 is used. Negative input values are replaced with 0.
  @see NumberFormat#setMaximumFractionDigits