Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8175709: DateTimeFormatterBuilder.appendZoneId() has misleading JavaDoc #22837

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Dec 19, 2024

Clarifying the documentation of DateTimeFormatterBuilder.appendZoneId() and similar methods to align the description with the behavior, in which ZoneOffset is only parsed from the formatter for offset texts without any prefixes. Corresponding CSR has also been drafted.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8346682 to be approved

Issues

  • JDK-8175709: DateTimeFormatterBuilder.appendZoneId() has misleading JavaDoc (Bug - P3)
  • JDK-8346682: DateTimeFormatterBuilder.appendZoneId() has misleading JavaDoc (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22837/head:pull/22837
$ git checkout pull/22837

Update a local copy of the PR:
$ git checkout pull/22837
$ git pull https://git.openjdk.org/jdk.git pull/22837/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22837

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22837.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 19, 2024

👋 Welcome back naoto! 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.

@openjdk
Copy link

openjdk bot commented Dec 19, 2024

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8175709: DateTimeFormatterBuilder.appendZoneId() has misleading JavaDoc

Reviewed-by: rriggs

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 96 new commits pushed to the master branch:

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels Dec 19, 2024
@openjdk
Copy link

openjdk bot commented Dec 19, 2024

@naotoj The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Dec 19, 2024

Webrevs

Comment on lines +1151 to +1154
* If the parse starts with '+' or '-', then the parser expects an
* offset-based zone and will not match region-based zones. The offset
* ID parsing is equivalent to using {@link #appendOffset(String, String)}
* using the arguments 'HH:MM:ss' and the no offset string '0'.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to drop UT, UTC, GMT, from offset parsing, looks to be correct.
However, it does accept parsing of the offset formatted strings in contradiction to the 2nd paragraph above.

     * This appends an instruction to format/parse the zone ID to the builder
     * only if it is a region-based ID.

This pre-existing text is also isn't clear in that the formatter is always appended to the builder.
The accepting only of a region-based ID occurs when the DateTimeFormatter.parse(...) is parsing.
Perhaps a separate clarification may be useful

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Roger. Updated the description per your suggestion.

Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Jan 6, 2025
@naotoj
Copy link
Member Author

naotoj commented Jan 7, 2025

Thanks for the review!
/integrate

@openjdk
Copy link

openjdk bot commented Jan 7, 2025

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

  • 030149f: 8334644: Automate javax/print/attribute/PageRangesException.java
  • c8a9dd3: 8346609: Improve MemorySegment.toString
  • 4d8fb80: 8347038: [JMH] jdk.incubator.vector.SpiltReplicate fails NoClassDefFoundError
  • cf3e48e: 8346965: Multiple compiler/ciReplay test fails with -XX:+SegmentedCodeCache
  • e5f0c19: 8345041: IGV: Free Placement Mode in IGV Layout
  • 8b22517: 8211851: (ch) java/nio/channels/AsynchronousSocketChannel/StressLoopback.java times out (aix)
  • 5e6cda4: 8347000: Bug in com/sun/net/httpserver/bugs/B6361557.java test
  • 3f7052e: 8346868: RISC-V: compiler/sharedstubs tests fail after JDK-8332689
  • f119663: 8346573: Can't use custom default file system provider with custom system class loader
  • 379ac34: 8346838: RISC-V: runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java crash with debug VMs
  • ... and 103 more: https://git.openjdk.org/jdk/compare/c75b1d4bf65d927e18b10ea6de263a331b78e13a...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 7, 2025
@openjdk openjdk bot closed this Jan 7, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 7, 2025
@openjdk
Copy link

openjdk bot commented Jan 7, 2025

@naotoj Pushed as commit 9702acc.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants