-
Bug
-
Resolution: Unresolved
-
P4
-
25
-
generic
-
generic
DecimalFormat digits are used during formatting. However, some users also assume that these digits would change parsing behavior.
For example, inJDK-6609652, since the pattern contains fractional digits, the user thinks that all parsed results should be of type Float/Double, and is surprised when they got Long.
Another example isJDK-6213123, the pattern only contains integer digits, so the user thinks that the parsed result should be integral only, and is surprised that it also parsed fractional digits.
It needs to be clarified that these digits do not affect parsing. (Which may be counter-intuitive, since other parts of the pattern do, such as prefix, grouping symbols, etc.)
For example, in
Another example is
It needs to be clarified that these digits do not affect parsing. (Which may be counter-intuitive, since other parts of the pattern do, such as prefix, grouping symbols, etc.)
- csr for
-
JDK-8352761 Misconceptions about j.text.DecimalFormat digits during parsing
-
- Draft
-
- relates to
-
JDK-6213123 [Fmt-Nu] DecimalFormat applies pattern "#" incorrectly
-
- Closed
-
-
JDK-6609652 [Fmt-Nu] DecimalFormat parse returns non-floating-point values for whole numbers
-
- Closed
-
- links to
-
Review(master) openjdk/jdk/24265