jdk8u-dev icon indicating copy to clipboard operation
jdk8u-dev copied to clipboard

8299677: Formatter.format might take a long time to format an integer or floating-point

Open chadrako opened this issue 1 year ago • 13 comments
trafficstars

Backport of JDK-8299677

Backport was not clean. Rewrote test to not include junit ParameterizedTest. Rewrote fix since String.repeat is not in JDK8


Progress

  • [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] JDK-8299677 needs maintainer approval

Issue

  • JDK-8299677: Formatter.format might take a long time to format an integer or floating-point (Bug - P4 - Requested)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/459/head:pull/459
$ git checkout pull/459

Update a local copy of the PR:
$ git checkout pull/459
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/459/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 459

View PR using the GUI difftool:
$ git pr show -t 459

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/459.diff

Webrev

Link to Webrev Comment

chadrako avatar Feb 26 '24 21:02 chadrako

:wave: Welcome back chadrako! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Feb 26 '24 21:02 bridgekeeper[bot]

This backport pull request has now been updated with issue from the original commit.

openjdk[bot] avatar Feb 26 '24 21:02 openjdk[bot]

Webrevs

mlbridge[bot] avatar Feb 26 '24 21:02 mlbridge[bot]

Looks good, except please change the Formatter.java copyright end date to 2023 to match the original commit.

Should the test Padding.java also be 2023 to match the original commit?

chadrako avatar Feb 28 '24 20:02 chadrako

Yes, I overlooked that.

phohensee avatar Feb 28 '24 20:02 phohensee

@chadrako This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8299677: Formatter.format might take a long time to format an integer or floating-point

Reviewed-by: shade, phh, andrew

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 55 new commits pushed to the master branch:

  • c8eb027b59dbb12150a1edd926b14fc2f6753bbd: 8075511: Enable -Woverloaded-virtual C++ warning for HotSpot build
  • 16ea85b54115073c6c22377b817878fe112b2100: 8335552: [8u] JDK-8303466 backport to 8u requires 3 ::Identity signature fixes
  • 54f7734c7cea3a20d49103c4387ed9023992e5a6: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL
  • 385e34d860965a77df355edfd8c1d99af5afe38c: 8262017: C2: assert(n != __null) failed: Bad immediate dominator info.
  • 44eac48705dd89f20cda5c4384cbecf417555eb1: 8137329: [windows] Build broken on VS2010 after "8046148: JEP 158: Unified JVM Logging"
  • a0715ab4bc71642203324a2c06774aacee35fda7: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel
  • b499ea7ec2ffb2211a67d38b3bd689a77866cb0d: 8030204: com/sun/jdi/JdbExprTest.sh: Required output "Can\'t convert 2147483648 to int" not found
  • b1e2ea81f45d9b144e1de8d16b2b698f1788d4d7: 8279164: Disable TLS_ECDH_* cipher suites
  • 6abb3f27b9a535f741c7d3a8dfa0d6b811263a9e: 8035395: sun/management/jmxremote/startstop/JMXStartStopTest.java fails intermittently: Port already in use
  • 683860572c87e9c89ba7de45264c1d32b195db8c: 8311666: Disabled tests in test/jdk/sun/java2d/marlin
  • ... and 45 more: https://git.openjdk.org/jdk8u-dev/compare/d7ad5bf5583bed023558c5bb9eaba12ded4987e2...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev, @phohensee, @gnu-andrew) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

openjdk[bot] avatar Mar 13 '24 20:03 openjdk[bot]

⚠️ @chadrako This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

openjdk[bot] avatar Mar 13 '24 22:03 openjdk[bot]

/approval Backport for fix that improves String.format for large number of zero padding. Backport was not clean since String.repeat and ParameterizedTest are not in JDK8. Users ran into issues with other versions so would like to backport for completeness. Change is simple but medium risk as it touches String.format code

chadrako avatar Apr 03 '24 16:04 chadrako

@chadrako usage: /approval [<id>] (request|cancel) [<text>]

openjdk[bot] avatar Apr 03 '24 16:04 openjdk[bot]

/approval 8299677 request Backport for fix that improves String.format for large number of zero padding. Backport was not clean since String.repeat and ParameterizedTest are not in JDK8. Users ran into issues with other versions so would like to backport for completeness. Change is simple but medium risk as it touches String.format code

chadrako avatar Apr 03 '24 16:04 chadrako

@chadrako 8299677: The approval request has been created successfully.

openjdk[bot] avatar Apr 03 '24 16:04 openjdk[bot]

@chadrako This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar May 01 '24 20:05 bridgekeeper[bot]

Commenting to keep PR open. Can a maintainer take a look at this request?

chadrako avatar May 01 '24 20:05 chadrako

@chadrako This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar May 29 '24 23:05 bridgekeeper[bot]

@chadrako This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

bridgekeeper[bot] avatar Jun 27 '24 01:06 bridgekeeper[bot]

/open

chadrako avatar Jun 27 '24 17:06 chadrako

@chadrako This pull request is now open

openjdk[bot] avatar Jun 27 '24 17:06 openjdk[bot]

/approve yes

gnu-andrew avatar Jul 05 '24 20:07 gnu-andrew

@gnu-andrew 8299677: The approval request has been approved.

openjdk[bot] avatar Jul 05 '24 20:07 openjdk[bot]

/integrate

chadrako avatar Jul 08 '24 16:07 chadrako

@chadrako Your change (at version 3c86b6f6d9ffa354c2cbf03029594ea74415f8c2) is now ready to be sponsored by a Committer.

openjdk[bot] avatar Jul 08 '24 16:07 openjdk[bot]

/sponsor

phohensee avatar Jul 08 '24 19:07 phohensee

Going to push as commit ddce2b5d39cb780c84d0c4d3bf01df2fe5d3d989. Since your change was applied there have been 55 commits pushed to the master branch:

  • c8eb027b59dbb12150a1edd926b14fc2f6753bbd: 8075511: Enable -Woverloaded-virtual C++ warning for HotSpot build
  • 16ea85b54115073c6c22377b817878fe112b2100: 8335552: [8u] JDK-8303466 backport to 8u requires 3 ::Identity signature fixes
  • 54f7734c7cea3a20d49103c4387ed9023992e5a6: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL
  • 385e34d860965a77df355edfd8c1d99af5afe38c: 8262017: C2: assert(n != __null) failed: Bad immediate dominator info.
  • 44eac48705dd89f20cda5c4384cbecf417555eb1: 8137329: [windows] Build broken on VS2010 after "8046148: JEP 158: Unified JVM Logging"
  • a0715ab4bc71642203324a2c06774aacee35fda7: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel
  • b499ea7ec2ffb2211a67d38b3bd689a77866cb0d: 8030204: com/sun/jdi/JdbExprTest.sh: Required output "Can\'t convert 2147483648 to int" not found
  • b1e2ea81f45d9b144e1de8d16b2b698f1788d4d7: 8279164: Disable TLS_ECDH_* cipher suites
  • 6abb3f27b9a535f741c7d3a8dfa0d6b811263a9e: 8035395: sun/management/jmxremote/startstop/JMXStartStopTest.java fails intermittently: Port already in use
  • 683860572c87e9c89ba7de45264c1d32b195db8c: 8311666: Disabled tests in test/jdk/sun/java2d/marlin
  • ... and 45 more: https://git.openjdk.org/jdk8u-dev/compare/d7ad5bf5583bed023558c5bb9eaba12ded4987e2...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Jul 08 '24 19:07 openjdk[bot]

@phohensee @chadrako Pushed as commit ddce2b5d39cb780c84d0c4d3bf01df2fe5d3d989.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Jul 08 '24 19:07 openjdk[bot]