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

8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation #16523

Closed
wants to merge 2 commits into from

Conversation

lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Nov 6, 2023

JShell does not understand "non-sealed" modifier when splitting input into snippets. The reason is that CompletenessAnalyzer.parseDeclaration (

while (token.kind.isDeclaration()) {
) is skipping through the declaration's initial tokens, but does not know it should ignore the - in the non-sealed. This patch fixes that by making - part of the declaration.


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-8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16523

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 6, 2023

👋 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 Nov 6, 2023
@openjdk
Copy link

openjdk bot commented Nov 6, 2023

@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 Nov 6, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 6, 2023

Webrevs

Copy link
Member

@asotona asotona 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.

@openjdk
Copy link

openjdk bot commented Nov 7, 2023

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

8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation

Reviewed-by: asotona

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

  • a7c0190: 8319238: JMX ThreadPoolAccTest.java is too verbose and should fail before timeout
  • 9ac6ac8: 8319559: [JVMCI] ensureLinked must be able to call Java
  • 1c0e7b7: 8319408: RISC-V: MaxVectorSize is not consistently checked in several situations
  • 74f1889: 8318678: Vector access on heap MemorySegments only works for byte[]
  • e1cae72: 8319197: Exclude hb-subset and hb-style from compilation
  • 419ed90: 8319450: New methods java.net.InetXAddress.ofLiteral() miss @SInCE tag
  • 439ed04: 8319233: AArch64: Build failure with clang due to -Wformat-nonliteral warning
  • e4803e0: 8318580: "javax/swing/MultiMonitor/MultimonVImage.java failing with Error. Can't find library: /open/test/jdk/java/awt/regtesthelpers" after JDK-8316053
  • cdf3373: 8319316: Clarify text around which layouts a linker supports
  • 1696603: 8308453: Convert JKS test keystores in test/jdk/javax/net/ssl/etc to PKCS12

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 Pull request is ready to be integrated label Nov 7, 2023
@lahodaj
Copy link
Contributor Author

lahodaj commented Nov 7, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Nov 7, 2023

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

  • 4a0ad46: 8317937: @sealedGraph: Links to inner classes fails in links
  • 134c382: 8319560: Reformat method parameters in the FFM API
  • ef8c840: 8319607: FFM: Review the language in the FFM documentation
  • bf9a93d: 8319204: G1: Change G1CMTask::_termination_time_ms to wallclock time
  • b2504a0: 8319525: RISC-V: Rename *_riscv64.ad files to *_riscv.ad under riscv/gc
  • bfafb27: 8319615: IGV incomplete gitignore
  • c760097: 8319541: G1: Inline G1RemoveSelfForwardsTask into RestoreRetainedRegionsTask
  • 85e4cde: 8319620: Parallel: Remove unused PSPromotionManager::*_is_full getters and setters
  • d22e368: 8319462: Signature.ClassTypeSig::classDesc() incorrect for inner class types
  • 541ff71: 8318144: Match on enum constants with body compiles but fails with MatchException
  • ... and 12 more: https://git.openjdk.org/jdk/compare/b3126b6e441bf52058075fa1fc9dc800af774ca9...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 7, 2023

@lahodaj Pushed as commit 45e68ae.

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

@lahodaj
Copy link
Contributor Author

lahodaj commented Nov 20, 2023

/backport jdk21u

@openjdk
Copy link

openjdk bot commented Nov 20, 2023

@lahodaj the backport was successfully created on the branch lahodaj-backport-45e68ae2 in my personal fork of openjdk/jdk21u. To create a pull request with this backport targeting openjdk/jdk21u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 45e68ae2 from the openjdk/jdk repository.

The commit being backported was authored by Jan Lahoda on 7 Nov 2023 and was reviewed by Adam Sotona.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u:

$ git fetch https://github.com/openjdk-bots/jdk21u.git lahodaj-backport-45e68ae2:lahodaj-backport-45e68ae2
$ git checkout lahodaj-backport-45e68ae2
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u.git lahodaj-backport-45e68ae2

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