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

8265474: Dubious 'null' assignment in CompactByteArray.expand #1880

Conversation

turbanoff
Copy link
Member

@turbanoff turbanoff commented Dec 23, 2020

I propose to remove 'null' assignment of field CompactByteArray.values in expand method. In the next statement this field is overridden with another value - tempArray.
This code was there from initial load of OpenJDK sources. I believe it was just leftovers from development phase of this class. There is no practical reason to assign null to non-volatile field and then overwrite it with another value.
Also I've removed unused method getArray. I hope it's ok to cleanup such unused stuff in the same PR.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8265474: Dubious 'null' assignment in CompactByteArray.expand

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1880

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 23, 2020

👋 Welcome back turbanoff! 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 openjdk bot commented Dec 23, 2020

@turbanoff 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 23, 2020
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 20, 2021

@turbanoff 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
Copy link

@bridgekeeper bridgekeeper bot commented Feb 17, 2021

@turbanoff 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!

@bridgekeeper bridgekeeper bot closed this Feb 17, 2021
@turbanoff turbanoff changed the title [PATCH] Remove dubious 'null' assignment to CompactByteArray.values 8265474: Dubious 'null' assignment in CompactByteArray.expand Apr 25, 2021
@turbanoff
Copy link
Member Author

@turbanoff turbanoff commented Apr 25, 2021

/open

@openjdk openjdk bot reopened this Apr 25, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 25, 2021

@turbanoff @HostUserDetails{id=741251, username='turbanoff', fullName='null'} this pull request is now open

@openjdk openjdk bot added the rfr label Apr 25, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 25, 2021

Webrevs

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 23, 2021

@turbanoff 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!

@turbanoff
Copy link
Member Author

@turbanoff turbanoff commented Jun 14, 2021

Let's keep open this PR with cleanup.

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 12, 2021

@turbanoff 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!

Copy link
Contributor

@AlanBateman AlanBateman left a comment

This cleanup looks okay, @naotoj?

@openjdk
Copy link

@openjdk openjdk bot commented Jul 23, 2021

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

8265474: Dubious 'null' assignment in CompactByteArray.expand

Reviewed-by: alanb, naoto

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

  • e627cae: 8270317: Large Allocation in CipherSuite
  • 0dcfc42: Merge
  • 8adf008: 8269984: [macos] JTabbedPane title looks like disabled
  • e90ed6c: 8271173: serviceability/jvmti/GetObjectSizeClass.java doesn't check exit code
  • b4c6229: 8271189: runtime/handshake/HandshakeTimeoutTest.java can be run in driver mode
  • 7468bbc: 8266988: compiler/jvmci/compilerToVM/IsMatureTest.java fails with Unexpected isMature state for multiple times invoked method: expected false to equal true
  • 286106d: 8271219: [REDO] JDK-8271063 Print injected fields for InstanceKlass
  • a1c0a6a: 8199594: Add doc describing how (?x) ignores spaces in character classes
  • 4ed548b: 8268261: C2: assert(n != __null) failed: Bad immediate dominator info.
  • ec71e2d: 8271221: [BACKOUT] JDK-8271063 Print injected fields for InstanceKlass
  • ... and 3005 more: https://git.openjdk.java.net/jdk/compare/4ea88512ddb89470ff5a043bc1865b9e4af661d6...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 (@AlanBateman, @naotoj) 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 openjdk bot added the ready label Jul 23, 2021
naotoj
naotoj approved these changes Jul 23, 2021
Copy link
Member

@naotoj naotoj left a comment

Yes, it does.

@turbanoff
Copy link
Member Author

@turbanoff turbanoff commented Jul 24, 2021

/integrate

@openjdk openjdk bot added the sponsor label Jul 24, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 24, 2021

@turbanoff
Your change (at version cf18247) is now ready to be sponsored by a Committer.

@naotoj
Copy link
Member

@naotoj naotoj commented Jul 26, 2021

/sponsor

@openjdk
Copy link

@openjdk openjdk bot commented Jul 26, 2021

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

  • 515113d: 8269924: Shenandoah: Introduce weak/strong marking asserts
  • f2c359a: 8271215: Fix data races in G1PeriodicGCTask
  • 36aefa3: 8270447: [IR Framework] Add missing compilation level restriction when using FlipC1C2 stress option
  • e4295cc: 8270519: Move several vector helper methods to shared header file
  • e627cae: 8270317: Large Allocation in CipherSuite
  • 0dcfc42: Merge
  • 8adf008: 8269984: [macos] JTabbedPane title looks like disabled
  • e90ed6c: 8271173: serviceability/jvmti/GetObjectSizeClass.java doesn't check exit code
  • b4c6229: 8271189: runtime/handshake/HandshakeTimeoutTest.java can be run in driver mode
  • 7468bbc: 8266988: compiler/jvmci/compilerToVM/IsMatureTest.java fails with Unexpected isMature state for multiple times invoked method: expected false to equal true
  • ... and 3009 more: https://git.openjdk.java.net/jdk/compare/4ea88512ddb89470ff5a043bc1865b9e4af661d6...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jul 26, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jul 26, 2021
@openjdk openjdk bot removed the sponsor label Jul 26, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 26, 2021

@naotoj @turbanoff Pushed as commit ee55361.

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

@turbanoff turbanoff deleted the field_CompactByteArray.values_is_assigned_twice branch Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs integrated
3 participants