On Tue, 23 Jan 2024 18:40:42 GMT, Justin Lu <j...@openjdk.org> wrote:
> Please review this PR which clarifies some confusion for the digit getter and > setter methods of DecimalFormat. > > When formatting non `BigInteger` and `BigDecimal` values, DecimalFormat uses > 309/340 as hard limits for integer and fraction digit limits, regardless of > the value set by the user. There was some confusion, that those numbers might > be returned by the getters, when in reality, they are only used internally. > > Moving the 309/340 wording to the class description and linking to it reduces > the repetitive wording, but also eliminates the confusion that the getters > may return those values. This should be OK, as setting limits higher than > those values are likely rare, so the warning does not need to be in every > method description. > > Additionally, `getMaximumIntegerDigits()` is updated to point to the patterns > section to warn about the non-obvious rules for max integer digits. Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/17541#pullrequestreview-1840051983