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

8294431: jshell reports error on initialisation of static final field of anonymous class #10489

Closed
wants to merge 1 commit into from

Conversation

lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Sep 29, 2022

When variable with an inferred type (i.e. var) is initialized with an anonymous class, the inferred type of the variable is the actual anonymous type. To implement this in JShell, JShell will unroll the anonymous class into a normal class, and to do this, it needs to initialize fields inside a constructor.

But, as we can have static fields in the anonymous class now, it is necessary to not try to initialize static fields in the constructor, as we would initialize them too often.


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-8294431: jshell reports error on initialisation of static final field of anonymous class

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10489

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 29, 2022

👋 Welcome back jlahoda! 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 Sep 29, 2022
@openjdk
Copy link

openjdk bot commented Sep 29, 2022

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

  • kulla

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 kulla kulla-dev@openjdk.org label Sep 29, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 29, 2022

Webrevs

Copy link
Member

@sundararajana sundararajana left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented Sep 29, 2022

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

8294431: jshell reports error on initialisation of static final field of anonymous class

Reviewed-by: sundar

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

  • ce85cac: 8065554: MatchResult should provide values of named-capturing groups
  • 1decdce: 8294492: RISC-V: Use li instead of patchable movptr at non-patchable callsites
  • 8491fd5: 8294551: Put java/io/BufferedInputStream/TransferTo.java on problem list
  • 6f8f28e: 8294160: misc crash dump improvements
  • 8873192: 8293515: heapShared.cpp: rename JavaThread parameter to current
  • 76f1865: 8293563: [macos-aarch64] SA core file tests failing with sun.jvm.hotspot.oops.UnknownOopException
  • 9db95ed: 8215788: Clarify JarInputStream Manifest access
  • 9309786: 8294472: Remove redundant rawtypes suppression in AbstractChronology
  • 3b7fc80: 8294411: SA should provide more useful info when it fails to start up due to "failed to workaround classshareing"
  • 4fb424b: 8293961: Unused ClassPathZipEntry::contents_do
  • ... and 45 more: https://git.openjdk.org/jdk/compare/91a23d775fbf482244ace5758f7b3084ea564460...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 Sep 29, 2022
@lahodaj
Copy link
Contributor Author

lahodaj commented Oct 3, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 3, 2022

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

  • 6e8f038: 8294567: IGV: IllegalStateException in search
  • bc668b9: 8293099: JFR: Typo in TestRemoteDump.java
  • 03f25a9: 8293562: blocked threads with KeepAliveCache.get
  • a69ee85: 8292336: JFR: Warn users if -XX:StartFlightRecording:disk=false is specified with maxage or maxsize
  • b8b9b97: 8294676: [JVMCI] InstalledCode.deoptimize(false) should not touch address field
  • fd59430: 8294610: java/net/vthread/HttpALot.java is slow on Linux
  • c7ab1ca: 8294609: C2: Improve inlining of methods with unloaded signature classes
  • 375f02f: 8294608: Remove redundant unchecked suppression in FileDescriptor
  • d207da8: 8294533: Documentation mistake in Process::getErrorStream and getInputStream
  • da4e96d: 8276545: Fix handling of trap count overflow in Parse::Parse()
  • ... and 78 more: https://git.openjdk.org/jdk/compare/91a23d775fbf482244ace5758f7b3084ea564460...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 3, 2022

@lahodaj Pushed as commit 8e9cfeb.

💡 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
integrated Pull request has been integrated kulla kulla-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

2 participants