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

8277980: ObjectMethods::bootstrap throws NPE when lookup is null #6754

Closed

Conversation

vicente-romero-oracle
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle commented Dec 8, 2021

Please review this simple patch along with the related CSR. The lookup argument at method java.lang.runtime.ObjectMethods::bootstrap was ignored until the fix for JDK-8261847 which improved the performance of the default implementation of Record::toString, given that now we are delegating part of the concatenation to StringConcatFactory::makeConcatWithConstants we do need now the lookup argument which can't be null anymore,

TIA


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed
  • Change requires a CSR request to be approved

Issues

  • JDK-8277980: ObjectMethods::bootstrap throws NPE when lookup is null
  • JDK-8278316: ObjectMethods::bootstrap throws NPE when lookup is null (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6754/head:pull/6754
$ git checkout pull/6754

Update a local copy of the PR:
$ git checkout pull/6754
$ git pull https://git.openjdk.java.net/jdk pull/6754/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6754

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6754.diff

@openjdk openjdk bot added the csr label Dec 8, 2021
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 8, 2021

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

@vicente-romero-oracle
Copy link
Contributor Author

@vicente-romero-oracle vicente-romero-oracle commented Dec 8, 2021

/csr

@openjdk openjdk bot added the rfr label Dec 8, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 8, 2021

@vicente-romero-oracle an approved CSR request is already required for this pull request.

@openjdk
Copy link

@openjdk openjdk bot commented Dec 8, 2021

@vicente-romero-oracle 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 label Dec 8, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 8, 2021

Webrevs

Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a comment

Looks OK, but given this is changing recently-reviewed code, I'd recommend getting a second opinion from one of the original reviewers, i.e. @mlchung

Update, I see the reason for the change, caused by JDK-8261847.

* @throws NullPointerException if any argument is {@code null}, in the case
* of the {@code getters} argument, its
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons Dec 8, 2021

Choose a reason for hiding this comment

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

OK. The second part about the contents of getters is a bit clunky, but was previously approved.

@vicente-romero-oracle
Copy link
Contributor Author

@vicente-romero-oracle vicente-romero-oracle commented Dec 8, 2021

I have updated the javadoc according to your comments

@openjdk openjdk bot removed the csr label Dec 8, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 8, 2021

@vicente-romero-oracle 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:

8277980: ObjectMethods::bootstrap throws NPE when lookup is null

Reviewed-by: jjg

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

  • 2478158: 8277361: java/nio/channels/Channels/ReadXBytes.java fails with OOM error
  • 8af3b27: 8277850: C2: optimize mask checks in counted loops
  • 3e93e0b: 8276769: -Xshare:auto should tolerate problems in the CDS archive
  • 79165b7: 8278324: Update the --generate-cds-archive jlink plugin usage message
  • 40d726b: 8278310: Improve logging in CDS DynamicLoaderConstraintsTest.java
  • e4852c6: 8277998: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#custom-cl-zgc failed "assert(ZAddress::is_marked(addr)) failed: Should be marked"
  • 37921e3: 8269258: java/net/httpclient/ManyRequestsLegacy.java failed with connection timeout
  • fd8cb2d: 8278346: java/nio/file/Files/probeContentType/Basic.java fails on Linux SLES15 machine
  • e5cb84e: 8278336: Use int64_t to represent byte quantities consistently in JfrObjectAllocationSample
  • 54993b1: 8278309: [windows] use of uninitialized OSThread::_state
  • ... and 11 more: https://git.openjdk.java.net/jdk/compare/716c2e1e85c244b31cf73e5ac1a2d765e3514c4d...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 label Dec 8, 2021
@vicente-romero-oracle
Copy link
Contributor Author

@vicente-romero-oracle vicente-romero-oracle commented Dec 8, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Dec 8, 2021

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

  • 3893f4f: 8278330: dump stack trace if the jvmti test nsk/jvmti/GetThreadState/thrstat002 is failed with wrong thread state
  • b3faecf: 8276116: C2: optimize long range checks in int counted loops
  • fe2ae8e: 8276904: Optional.toString() is unnecessarily expensive
  • 6e7b7f3: 8278251: Enable "missing-explicit-ctor" check in the jdk.unsupported.desktop module
  • c83b781: 8278459: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-aarch64
  • 8e8fadf: 8278428: ObjectInputStream.readFully range check incorrect
  • 5a80abf: 8272944: Use snippets in jdk.javadoc documentation
  • fb11d8f: 8272945: Use snippets in java.compiler documentation
  • 42d9b1b: 8277106: Cannot compile certain sources with --release
  • ba86dd4: 8278445: ProblemList tools/jpackage/share/IconTest.java on macosx-x64
  • ... and 24 more: https://git.openjdk.java.net/jdk/compare/716c2e1e85c244b31cf73e5ac1a2d765e3514c4d...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Dec 8, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Dec 8, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 8, 2021

@vicente-romero-oracle Pushed as commit 03bf55f.

💡 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 integrated
2 participants