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

8258662: JDK 17ea: Crash compiling instanceof check involving sealed interface #1849

Closed
wants to merge 2 commits into from

Conversation

lgxbslgx
Copy link
Member

@lgxbslgx lgxbslgx commented Dec 19, 2020

Hi all,

The method Types.isCastable uses method Types.areDisjoint to do some check. But Types.isCastable doesn't check the type of the parameter before invoking method Types.areDisjoint. This patch adds the corresponding check and add a test case.

Thank you for taking the time to review.

Best Regards.


Progress

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

Issue

  • JDK-8258662: JDK 17ea: Crash compiling instanceof check involving sealed interface

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1849/head:pull/1849
$ git checkout pull/1849

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 19, 2020

👋 Welcome back lgxbslgx! 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 Dec 19, 2020
@openjdk
Copy link

openjdk bot commented Dec 19, 2020

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

  • compiler

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 compiler compiler-dev@openjdk.org label Dec 19, 2020
@mlbridge
Copy link

mlbridge bot commented Dec 19, 2020

Webrevs

@jonathan-gibbons
Copy link
Contributor

In general, the coding style in javac is to use methods and/or the kind to determine whether is symbol is the symbol for a class or not.

I'll leave it to others to recommend the current best practice for a change like this.

Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle left a comment

Choose a reason for hiding this comment

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

the fix looks good to me but we need this code in JDK 16, please create another PR targeting JDK 16 and close this one. Thanks for the fix!

@lgxbslgx
Copy link
Member Author

Move it to JDK 16. Please see openjdk/jdk16#63.

@lgxbslgx lgxbslgx closed this Dec 23, 2020
@lgxbslgx lgxbslgx deleted the JDK-8258662 branch December 23, 2020 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

3 participants