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

JDK-8289775: Update java.lang.invoke.MethodHandle[s] to use snippets #9385

Closed
wants to merge 1 commit into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Jul 5, 2022

Update existing examples in java.lang.invoke.{MethodHandle, MethodHandles} to use snippets rather than the older markup idiom.


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-8289775: Update java.lang.invoke.MethodHandle[s] to use snippets

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9385

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 5, 2022

👋 Welcome back darcy! 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 Jul 5, 2022
@openjdk
Copy link

openjdk bot commented Jul 5, 2022

@jddarcy The following label will be automatically applied to this pull request:

  • core-libs

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

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Jul 5, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 5, 2022

Webrevs

Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

In addition, I believe we can add link in many examples, but I am not sure if this is part of this issue or if it will be addressed separately.

@@ -268,7 +268,7 @@
*
* <h2>Usage examples</h2>
* Here are some examples of usage:
* <blockquote><pre>{@code
* {@snippet lang="java" :
Object x, y; String s; int i;
Copy link
Member

Choose a reason for hiding this comment

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

These lines can now be properly indented, and they should be.

Copy link
Member Author

Choose a reason for hiding this comment

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

That isn't an unreasonable suggestion. However, I wanted to present this change in an easy-to-review fashion so limited the diffs to the bracketing tags.

Copy link
Contributor

@rose00 rose00 left a comment

Choose a reason for hiding this comment

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

The code examples in these files were exdented to make it easier to extract example code and test it, and to maintain equivalence during active development of the APIs.

The examples in runnable form are in test/jdk/java/lang/invoke/JavaDocExamplesTest.java in the same repo.

It would be nice if some day we could tie together the two copies into one using a link. I don't recall whether snippets can do this or not, given that the two copies are far apart in the repo structure.

I agree that just the bracket changes are valuable by themselves. I also have no objection to fixing the exdentation.

@openjdk
Copy link

openjdk bot commented Jul 6, 2022

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

8289775: Update java.lang.invoke.MethodHandle[s] to use snippets

Reviewed-by: jrose

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

  • 35387d5: 8289260: BigDecimal movePointLeft() and movePointRight() do not follow their API spec
  • 9f37ba4: 8288706: Unused parameter 'boolean newln' in method java.lang.VersionProps#print(boolean, boolean)
  • dfb24ae: 8289060: Undefined Behaviour in class VMReg
  • 82a8bd7: 8287596: Reorg jdk.test.lib.util.ForceGC
  • cc2b792: 8288992: AArch64: CMN should be handled the same way as CMP
  • 75c0a5b: 8288824: [arm32] Display isetstate in register output
  • 83a5d59: 8278479: RunThese test failure with +UseHeavyMonitors and +VerifyHeavyMonitors
  • cbaf6e8: 8288022: c2: Transform (CastLL (AddL into (AddL (CastLL when possible
  • 8341895: 8289739: Add G1 specific GC breakpoints for testing
  • ac6be16: 8289695: [TESTBUG] TestMemoryAwareness.java fails on cgroups v2 and crun
  • ... and 7 more: https://git.openjdk.org/jdk/compare/77c3bbf105403089fec69d51406fe3e6f562271f...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 Jul 6, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Jul 6, 2022

The code examples in these files were exdented to make it easier to extract example code and test it, and to maintain equivalence during active development of the APIs.

The examples in runnable form are in test/jdk/java/lang/invoke/JavaDocExamplesTest.java in the same repo.

It would be nice if some day we could tie together the two copies into one using a link. I don't recall whether snippets can do this or not, given that the two copies are far apart in the repo structure.

I agree that just the bracket changes are valuable by themselves. I also have no objection to fixing the exdentation.

Thanks John; I'll push the update to use the snippet tag as-is and leave further refinements to future work.

@jddarcy
Copy link
Member Author

jddarcy commented Jul 6, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jul 6, 2022

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

  • 2a6ec88: Merge
  • 0526402: 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
  • b3a0e48: 8289439: Clarify relationship between ThreadStart/ThreadEnd and can_support_virtual_threads capability
  • 0b6fd48: 8288128: S390X: Fix crashes after JDK-8284161 (Virtual Threads)
  • 30e134e: 8289091: move oop safety check from SharedRuntime::get_java_tid() to JavaThread::threadObj()
  • 29ea642: 8287847: Fatal Error when suspending virtual thread after it has terminated
  • f640fc5: 8067757: Incorrect HTML generation for copied javadoc with multiple @throws tags
  • 0dff327: 8289569: [test] java/lang/ProcessBuilder/Basic.java fails on Alpine/musl
  • 1a27164: 8287851: C2 crash: assert(t->meet(t0) == t) failed: Not monotonic
  • 5b5bc6c: 8287672: jtreg test com/sun/jndi/ldap/LdapPoolTimeoutTest.java fails intermittently in nightly run
  • ... and 19 more: https://git.openjdk.org/jdk/compare/77c3bbf105403089fec69d51406fe3e6f562271f...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 6, 2022

@jddarcy Pushed as commit a40c17b.

💡 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 integrated Pull request has been integrated
3 participants