On Tue, 5 Mar 2024 21:27:09 GMT, Justin Lu wrote:
>> Please review this PR and corresponding CSR which prevents an
>> OutOfMemoryError by restricting the initial maximum fraction digits for an
>> empty pattern DecimalFormat.
>>
>> For an empty String pattern DecimalFormat, the maximum
> Please review this PR and corresponding CSR which prevents an
> OutOfMemoryError by restricting the initial maximum fraction digits for an
> empty pattern DecimalFormat.
>
> For an empty String pattern DecimalFormat, the maximum fraction digits is
> initialized to `Integer.MAX_VALUE`. When
On Tue, 5 Mar 2024 21:23:48 GMT, Justin Lu wrote:
>> test/jdk/java/text/Format/DecimalFormat/ToPatternTest.java line 60:
>>
>>> 58: dFmt.setMinimumFractionDigits(minFrac);
>>> 59:
>>> 60: String[] patterns = dFmt.toPattern().split("\\.");
>>
>> Instead of assuming/hardcoding
On Tue, 5 Mar 2024 19:10:19 GMT, Naoto Sato wrote:
>> Justin Lu has updated the pull request with a new target base due to a merge
>> or a rebase. The incremental webrev excludes the unrelated changes brought
>> in by the merge/rebase. The pull request contains five additional commits
>>
> Please review this PR and corresponding CSR which prevents an
> OutOfMemoryError by restricting the initial maximum fraction digits for an
> empty pattern DecimalFormat.
>
> For an empty String pattern DecimalFormat, the maximum fraction digits is
> initialized to `Integer.MAX_VALUE`. When
On Tue, 5 Mar 2024 00:32:47 GMT, Justin Lu wrote:
>> Please review this PR and corresponding CSR which prevents an
>> OutOfMemoryError by restricting the initial maximum fraction digits for an
>> empty pattern DecimalFormat.
>>
>> For an empty String pattern DecimalFormat, the maximum
On Tue, 5 Mar 2024 00:15:10 GMT, Justin Lu wrote:
> For clarification, this is entirely a bug with DecimalFormat, not
> StringBuilder. An empty String pattern DecimalFormat sets the maximum
> fraction digits to Integer.MAX_VALUE. When toPattern() is invoked, the local
> StringBuilder will
On Sun, 3 Mar 2024 05:00:36 GMT, Guoxiong Li wrote:
>> Please review this PR and corresponding CSR which prevents an
>> OutOfMemoryError by restricting the initial maximum fraction digits for an
>> empty pattern DecimalFormat.
>>
>> For an empty String pattern DecimalFormat, the maximum
On Mon, 4 Mar 2024 16:03:55 GMT, Roger Riggs wrote:
>> Justin Lu has updated the pull request with a new target base due to a merge
>> or a rebase. The incremental webrev excludes the unrelated changes brought
>> in by the merge/rebase. The pull request contains five additional commits
>>
> Please review this PR and corresponding CSR which prevents an
> OutOfMemoryError by restricting the initial maximum fraction digits for an
> empty pattern DecimalFormat.
>
> For an empty String pattern DecimalFormat, the maximum fraction digits is
> initialized to `Integer.MAX_VALUE`. When
On Sat, 2 Mar 2024 00:34:32 GMT, Justin Lu wrote:
> Please review this PR and corresponding CSR which prevents an
> OutOfMemoryError by restricting the initial maximum fraction digits for an
> empty pattern DecimalFormat.
>
> For an empty String pattern DecimalFormat, the maximum fraction
On Sat, 2 Mar 2024 00:34:32 GMT, Justin Lu wrote:
> Please review this PR and corresponding CSR which prevents an
> OutOfMemoryError by restricting the initial maximum fraction digits for an
> empty pattern DecimalFormat.
>
> For an empty String pattern DecimalFormat, the maximum fraction
On Sat, 2 Mar 2024 00:34:32 GMT, Justin Lu wrote:
> When toPattern() is invoked, StringBuilder internally doubles capacity
> attempting to append Integer.MAX_VALUE digits until OOME occurs.
It seems a bug in `toPattern` or `StringBuilder`? May be better to investigate
more about it.
Please review this PR and corresponding CSR which prevents an OutOfMemoryError
by restricting the initial maximum fraction digits for an empty pattern
DecimalFormat.
The cause is that the maximum fraction digits is initialized to
`Integer.MAX_VALUE` which causes StringBuilder to eventually
14 matches
Mail list logo