This Message Is From an External Sender
This message came from outside your organization.
On Sat, 2 Mar 2024 00:34:32 GMT, Justin Lu <j...@openjdk.org> 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 digits is initialized to `Integer.MAX_VALUE`. When toPattern() is invoked, StringBuilder internally doubles capacity attempting to append Integer.MAX_VALUE digits until OOME occurs. CSR covers potential behavioral compatibility changes. This pull request has now been integrated. Changeset: 6efdaf8d Author: Justin Lu <j...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/6efdaf8ddf2940bcd5f96e114fe05b951ace313b Stats: 259 lines in 3 files changed: 201 ins; 34 del; 24 mod 8326908: DecimalFormat::toPattern throws OutOfMemoryError when pattern is empty string Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/18094