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

8319986: Invalid/inconsistent description and example for DateFormat #16645

Closed

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Nov 13, 2023

Correcting the explanation of the DateFormat.SHORT constant.


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

Issue

  • JDK-8319986: Invalid/inconsistent description and example for DateFormat (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16645

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 13, 2023

👋 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 openjdk bot added the rfr Pull request is ready for review label Nov 13, 2023
@openjdk
Copy link

openjdk bot commented Nov 13, 2023

@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.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Nov 13, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 13, 2023

Webrevs

@@ -117,7 +117,7 @@
* different options to these factory methods to control the length of the
* result; from {@link #SHORT} to {@link #MEDIUM} to {@link #LONG} to {@link #FULL}. The exact result depends
* on the locale, but generally:
* <ul><li>{@link #SHORT} is completely numeric, such as {@code 12.13.52} or {@code 3:30pm}
* <ul><li>{@link #SHORT} is the shortest and mainly numeric, such as {@code 12.13.52} or {@code 3:30pm}
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we want to update the descriptions of all options, but if we want to be consistent, here's a suggestion, how about:
{@link #SHORT} is a concise format using numeric digits, for example, {@code 12.13.52} or {@code 3:30pm}
{@link #MEDIUM} provides more detail, such as {@code Jan 12, 1952}
{@link #LONG} is a comprehensive format, such as {@code January 12, 1952} or {@code 3:30:32pm}
{@link #FULL} provides a complete date representation, such as

"pretty completely" is a bit casual :-)

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 for the feedback, Joe. I think I would rather keep the description somewhat abstract, simply mentioning the formatted output is SHORT <= MEDIUM <= LONG <= FULL in length-wise. As it is noted in the previous sentence, it is pretty much locale-dependent.
I simply replaced that casual wording with "the longest" for consistency.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any value in mentioning that MEDIUM format typically uses abbreviations.
Whereas the LONG and FULL format typically does not use abbreviations. (For months)

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a sentence explaining it.

@@ -117,10 +117,10 @@
* different options to these factory methods to control the length of the
* result; from {@link #SHORT} to {@link #MEDIUM} to {@link #LONG} to {@link #FULL}. The exact result depends
* on the locale, but generally:
* <ul><li>{@link #SHORT} is completely numeric, such as {@code 12.13.52} or {@code 3:30pm}
* <ul><li>{@link #SHORT} is the shortest and mainly numeric, such as {@code 12.13.52} or {@code 3:30pm}
* <li>{@link #MEDIUM} is longer, such as {@code Jan 12, 1952}
* <li>{@link #LONG} is longer, such as {@code January 12, 1952} or {@code 3:30:32pm}
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to change LONG to "is even longer" or "is longer than MEDIUM"?

Still keeps it abstract but clarifies it a little more IMO (and should still hold true regardless of locale)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Replaced as suggested.

@openjdk
Copy link

openjdk bot commented Nov 14, 2023

@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:

8319986: Invalid/inconsistent description and example for DateFormat

Reviewed-by: joehw, rriggs, jlu, iris, lancea

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

  • 12fce4b: 8287843: File::getCanonicalFile doesn't work for \?\C:\ style paths DOS device paths
  • 346dbd6: 8319196: ExecutableElement.getReceiverType doesn't return receiver types for methods loaded from bytecode
  • 0ea5804: 8318759: Add four DigiCert root certificates
  • 6a75c24: 8319958: test/jdk/java/io/File/libGetXSpace.c does not compile on Windows 32-bit
  • 58af9ae: 8316392: compiler/interpreter/TestVerifyStackAfterDeopt.java failed with SIGBUS in PcDescContainer::find_pc_desc_internal
  • a75b6e5: 8191460: crash in Annotate with duplicate declaration and annotation processing enabled
  • 7bb1999: 8316342: CLHSDB "dumpclass" command produces invalid classes
  • 97ea5bf: 8319961: JvmtiEnvBase doesn't zero _ext_event_callbacks
  • 25f9af9: 8319883: Zero: Use atomic built-ins for 64-bit accesses
  • 9c98270: 8254693: Add Panama feature to pass heap segments to native code
  • ... and 13 more: https://git.openjdk.org/jdk/compare/115b0744c6ba8d990eef5a31d64d6a184182c754...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.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 14, 2023
@naotoj
Copy link
Member Author

naotoj commented Nov 15, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Nov 15, 2023

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

  • 536b1ce: 8320130: Problemlist 2 vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt tests with Xcomp
  • 0bda467: 8319187: Add three eMudhra emSign roots
  • 3c6ffca: 8318219: RISC-V: C2 ExpandBits
  • 77a6966: 8320053: GHA: Cross-compile gtest code
  • 4f4d00f: 8319966: AIX: expected [[0:i4]] but found [[0:I4]] after JDK-8319882
  • 2e34a2e: 8318671: Potential uninitialized uintx value after JDK-8317683
  • fac6b51: 8319781: RISC-V: Refactor UseRVV related checks
  • bad6999: 8313672: C2: PhaseCCP does not correctly track analysis dependencies involving shift, convert, and mask
  • fbe1937: 8319955: Improve dependencies removal during class unloading
  • 4c1540b: 8287284: C2: loop optimization performs split_thru_phi infinitely many times
  • ... and 30 more: https://git.openjdk.org/jdk/compare/115b0744c6ba8d990eef5a31d64d6a184182c754...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 15, 2023

@naotoj Pushed as commit 891d8cf.

💡 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
Labels
core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org integrated Pull request has been integrated
6 participants