> Please review this PR which clarifies the behavior for integer and fraction 
> limits in NumberFormat and implementing classes. An associated CSR is filed.
> 
> There have been a few bugs submitted which indicate a misconception that 
> these limits impact parsing. The actual behavior is that these limits only 
> affect formatting. The specification is vague regarding this, and can be 
> explicitly updated to eliminate confusion. As the implementing classes are 
> updated to use `inheritDoc`, some shuffling around in the method specs are 
> included in this change as well.
> 
> Alternatively I considered making this change as implementation specific to 
> DecimalFormat and CompactNumberFormat only. (i.e. leave flexibility for other 
> NumberFormat subclasses to define their own behavior on whether the limits 
> affect parsing.) I am open to this option as well, but initially decided 
> against it as 
> 1) Unlike formatting, it seems like a rare use case that you would want to 
> suppress the range of digits of accepted during parsing. 
> `setParseIntegerOnly()` already provides functionality to toggle between 
> integer and fraction parsing.
> 2) The limits affecting formatting only has been the long-standing behavior 
> for all the subclasses of NumberFormat provided by the OpenJDK reference 
> implementation.

Justin Lu has updated the pull request incrementally with one additional commit 
since the last revision:

  Naoto's review: apiN -> implN. Rewording of maxintdig callout

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/24265/files
  - new: https://git.openjdk.org/jdk/pull/24265/files/19d05f9c..5fc8f37f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24265&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24265&range=00-01

  Stats: 9 lines in 2 files changed: 1 ins; 2 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/24265.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24265/head:pull/24265

PR: https://git.openjdk.org/jdk/pull/24265

Reply via email to