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

8337302: Undefined type variable results in null #20535

Closed
wants to merge 4 commits into from

Conversation

raphw
Copy link
Member

@raphw raphw commented Aug 11, 2024

When a type uses a type variable without a declaration, no exception is thrown. This change triggers a TypeNotFoundException to be thrown.


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
  • Change requires CSR request JDK-8338198 to be approved

Issues

  • JDK-8337302: Undefined type variable results in null (Bug - P4)
  • JDK-8338198: Undefined type variables now cause TypeNotPresentException (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20535

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

Using diff file

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

Webrev

Link to Webrev Comment

@raphw raphw changed the title JDK-8337302: Throw exception upon search for type variable without representation. 8337302: Throw exception upon search for type variable without representation. Aug 11, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Aug 11, 2024

👋 Welcome back winterhalter! 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 bot commented Aug 11, 2024

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

8337302: Undefined type variable results in null

Reviewed-by: liach

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

  • 147e300: 8340015: Open source several AWT focus tests - series 7
  • 202fd42: 8340213: jcmd VM.events ignores max argument
  • dfc9093: 8340132: Remove internal CpException for reading malformed utf8
  • f0ae90f: 8340210: Add positionTestUI() to PassFailJFrame.Builder
  • eabfc6e: 8337563: NMT: rename MEMFLAGS to MemTag
  • d588182: 8338686: App classpath mismatch if a jar from the Class-Path attribute is on the classpath
  • 5dc9723: 8340323: Test jdk/classfile/OptionsTest.java fails after JDK-8340200
  • 90e92f9: 8339790: Support Intel APX setzucc instruction
  • 28d009c: 8339934: Simplify Math.scalb(double) method
  • 3e14fb9: 8340200: Misspelled constant AttributesProcessingOption.DROP_UNSTABLE_ATRIBUTES
  • ... and 470 more: https://git.openjdk.org/jdk/compare/7146daee68788bf9a33d6eed6fb0614a82644cbc...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 (@liach) 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 rfr Pull request is ready for review label Aug 11, 2024
@openjdk
Copy link

openjdk bot commented Aug 11, 2024

@raphw 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 core-libs-dev@openjdk.org label Aug 11, 2024
@raphw raphw changed the title 8337302: Throw exception upon search for type variable without representation. 8337302: Undefined type variable results in null Aug 11, 2024
@mlbridge
Copy link

mlbridge bot commented Aug 11, 2024

Webrevs

* a type variable is read where no declaration of this type variable
* can be found. This exception differs from{@link ClassNotFoundException}
* in that {@code ClassNotFoundException} is a checked exception, whereas
* this exception is unchecked.
*
* <p>Note that this exception may be used when undefined type variables
Copy link
Member

Choose a reason for hiding this comment

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

Seems we can remove this note, now that we moved it to the last paragraph :)

@openjdk
Copy link

openjdk bot commented Aug 12, 2024

@raphw Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Aug 12, 2024
@liach
Copy link
Member

liach commented Aug 12, 2024

I have filled in the CSR for you.

Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Thanks for this patch!

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Sep 11, 2024
@liach
Copy link
Member

liach commented Sep 17, 2024

@raphw Your patch is ready and you can integrate it with the /integrate command, just in case this got forgotten. I can clean up the test case later.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 17, 2024
@raphw
Copy link
Member Author

raphw commented Sep 17, 2024

@liach I forgot about this over the pending CSR, sorry. I added the code comment as requested to show of the generated class. Does this need another approval before I can run integrate?

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 17, 2024
@liach
Copy link
Member

liach commented Sep 17, 2024

I think you have addressed the problems; we usually wait about 24 hours in case people are interested to review the latest push.

@raphw
Copy link
Member Author

raphw commented Sep 18, 2024

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 18, 2024
@openjdk
Copy link

openjdk bot commented Sep 18, 2024

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

@liach
Copy link
Member

liach commented Sep 18, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 18, 2024

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

  • aeba1ea: 8340272: C2 SuperWord: JMH benchmark for Reduction vectorization
  • 19b2cee: 8340113: Remove JULONG as a Diagnostic Command argument type (jcmd JFR.view)
  • 45e438f: 8339845: Update color.org and wapforum.org links to use HTTPS instead of HTTP
  • 4ff17c1: 8319873: Add windows implementation for jcmd System.map and System.dump_map
  • 3895b8f: 8340230: Tests crash: assert(is_in_encoding_range || k->is_interface() || k->is_abstract()) failed: sanity
  • 5381f55: 8333258: C2: high memory usage in PhaseCFG::insert_anti_dependences()
  • d23c59e: 8340280: Avoid calling MT.invokerType() when creating LambdaForms
  • 147e300: 8340015: Open source several AWT focus tests - series 7
  • 202fd42: 8340213: jcmd VM.events ignores max argument
  • dfc9093: 8340132: Remove internal CpException for reading malformed utf8
  • ... and 477 more: https://git.openjdk.org/jdk/compare/7146daee68788bf9a33d6eed6fb0614a82644cbc...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 18, 2024
@openjdk openjdk bot closed this Sep 18, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Sep 18, 2024
@openjdk
Copy link

openjdk bot commented Sep 18, 2024

@liach @raphw Pushed as commit 1d070a3.

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

Successfully merging this pull request may close these issues.

3 participants