-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8357653: Inner classes of type parameters emitted as raw types in signatures #25451
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
Conversation
|
👋 Welcome back abimpoudis! A progress list of the required criteria for merging this PR into |
|
@biboudis 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: 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 79 new commits pushed to the
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 |
|
/csr needed |
|
@biboudis has indicated that a compatibility and specification (CSR) request is needed for this pull request. @biboudis please create a CSR request for issue JDK-8357653 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
|
/contributor add @mcimadamore |
|
@biboudis |
Webrevs
|
|
Looks good - I'm unsure whether we should unify the two routines as part of this fix, or if we wanna keep that for a separate PR (given that might be a potential extra risk) |
vicente-romero-oracle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks sensible to me
vicente-romero-oracle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
|
/issue add JDK-8357472 |
|
@biboudis |
mcimadamore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new fix looks good. IMHO the main thing we need to add here is some better comments for asEnclosingSuper and asOuterSuper to describe in which cases they should be used.
|
I revised the text a bit. Let me know if that's a good direction. I am still think about the opportunity we may have here o unify the two methods; maybe also by introducing some enum to emphasize the different modes of interpretation for qualified types? |
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
vicente-romero-oracle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
mcimadamore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to go. If you want to add more examples or comments in the javadoc, that might be useful, but the PR as is looks good.
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
vicente-romero-oracle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks!
liach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bikeshedding
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Chen Liang <liach@openjdk.org>
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Outdated
Show resolved
Hide resolved
mcimadamore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good, I left two optional minor doc changes
Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore@users.noreply.github.com>
|
/integrate |
|
Going to push as commit 5e4a2ea.
Your commit was automatically rebased without conflicts. |
There are various occasions that the qualifier of an inner type needs to be normalized.
Briefly:
G.Getterin the first example,M.B<?>in the second example).B<?>which is not qualified but its type needs be calculated as seen fromA<String>.B<?>).Semi-formally:
A type reference is simple name
R:Ris a non-inner class type, nothing to doRis an inner class type, we need to find an implicit type qualifierS<T>.R, whereSis the class in whichRis enclosedRis an array typeA[], repeat the analysis for the simple type nameA, and then use the implicit type qualifier to rewrite the arrayA type reference is a qualified name
Q.RQ, namelyS<T>, whereSis the class in whichRis enclosedProgress
Issues
Reviewers
Contributors
<mcimadamore@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25451/head:pull/25451$ git checkout pull/25451Update a local copy of the PR:
$ git checkout pull/25451$ git pull https://git.openjdk.org/jdk.git pull/25451/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25451View PR using the GUI difftool:
$ git pr show -t 25451Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25451.diff
Using Webrev
Link to Webrev Comment