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

8267121: Illegal access to private "size" field of ArrayList from build.gradle #503

Conversation

kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented May 15, 2021

A test of our CI build with gradle 7.0.1 and JDK 16.0.1 revealed a latent bug in build.gradle in the fetchExternalTools() method. It checks the size of an ArrayList in two places, but rather than calling the size() method it omits the () which means it is accessing the private size field.

Starting in JDK 16, which has default strong encapsulation, this no longer works, so we need to fix this before switching. We really should fix it anyway, since accessing the internal field is both unnecessary and wrong.


Progress

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

Issue

  • JDK-8267121: Illegal access to private "size" field of ArrayList from build.gradle

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 503

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 15, 2021

👋 Welcome back kcr! 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 Ready for review label May 15, 2021
@mlbridge
Copy link

mlbridge bot commented May 15, 2021

Webrevs

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

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

lgtm, Did not find any other instance where size member variable is used.

@openjdk
Copy link

openjdk bot commented May 17, 2021

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

8267121: Illegal access to private "size" field of ArrayList from build.gradle

Reviewed-by: arapte, jvos

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

  • 8ca7815: 8267160: Monocle mouse never get ENTERED state
  • 9e8c617: 8266516: One label typo in the properties for bi-directional text
  • 389e8c0: 8266968: Ignore test.com.sun.webkit.LocalStorageAccessTest
  • e40b0b8: 8266811: Openjfx controls test build broken (Eclipse)

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 the ready Ready to be integrated label May 17, 2021
Copy link
Collaborator

@johanvos johanvos left a comment

Choose a reason for hiding this comment

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

looks good.

@kevinrushforth
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this May 17, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Ready to be integrated rfr Ready for review labels May 17, 2021
@openjdk
Copy link

openjdk bot commented May 17, 2021

@kevinrushforth Since your change was applied there have been 6 commits pushed to the master branch:

  • f236a7d: 8266539: [TreeView]: Change.getRemoved() contains null item when deselecting a TreeItem
  • 285a0b6: 8264770: BidirectionalBinding should use InvalidationListener to prevent boxing
  • 8ca7815: 8267160: Monocle mouse never get ENTERED state
  • 9e8c617: 8266516: One label typo in the properties for bi-directional text
  • 389e8c0: 8266968: Ignore test.com.sun.webkit.LocalStorageAccessTest
  • e40b0b8: 8266811: Openjfx controls test build broken (Eclipse)

Your commit was automatically rebased without conflicts.

Pushed as commit 9c97d9b.

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

@kevinrushforth kevinrushforth deleted the 8267121-illegal-access-size branch May 17, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
3 participants