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

8322477: order of subclasses in the permits clause can differ between compilations #310

Closed
wants to merge 2 commits into from

Conversation

GoeLin
Copy link
Member

@GoeLin GoeLin commented Mar 1, 2024

I backport this for parity with 21.0.4-oracle.

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
I had to resolve because indentation is different. Changed coding is the same.


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
  • JDK-8322477 needs maintainer approval

Issue

  • JDK-8322477: order of subclasses in the permits clause can differ between compilations (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/310/head:pull/310
$ git checkout pull/310

Update a local copy of the PR:
$ git checkout pull/310
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/310/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 310

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/310.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 1, 2024

👋 Welcome back goetz! 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 changed the title Backport 5ba69e17340cf44194c080a38219c6e150418fcf 8322477: order of subclasses in the permits clause can differ between compilations Mar 1, 2024
@openjdk
Copy link

openjdk bot commented Mar 1, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Mar 1, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 1, 2024

Webrevs

@shipilev
Copy link
Member

shipilev commented Mar 1, 2024

I am surprised we have indenting conflicts. Shouldn't we do the backport of https://bugs.openjdk.org/browse/JDK-8319987 first?

@GoeLin
Copy link
Member Author

GoeLin commented Mar 4, 2024

GHA failure: Well known Risk-V build issue. Unrelated.

@GoeLin
Copy link
Member Author

GoeLin commented Mar 4, 2024

Hi,
yes, JDK-8319987 might make Types.java clean.
in Attr.java, the indentation was changed by https://bugs.openjdk.org/browse/JDK-8316470: Incorrect error location for "invalid permits clause" depending on file order.
I don't think we should backport all dependencies just to avoid trivial conflicts. I chose this one to keep track with Oracle.

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

Looks basically good. Only one minor thing below. https://bugs.openjdk.org/browse/JDK-8319987 would only resolve one trivial diff. Is that planned to be backported for 21.0.4, too? If nobody wants to backport that one very soon, I don't think we have to wait.

@@ -5492,7 +5492,7 @@ void attribClass(ClassSymbol c) throws CompletionFailure {

if (!c.type.isCompound()) {
for (ClassSymbol supertypeSym : sealedSupers) {
if (!supertypeSym.permitted.contains(c.type.tsym)) {
if (!supertypeSym.isPermittedSubclass(c.type.tsym)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation is off by one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the review. Fixed.

@openjdk
Copy link

openjdk bot commented Mar 5, 2024

⚠️ @GoeLin This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@GoeLin
Copy link
Member Author

GoeLin commented Mar 5, 2024

GHA failure: Risc-V compile issue, unrelated.

@openjdk openjdk bot added the approval label Mar 6, 2024
@openjdk
Copy link

openjdk bot commented Mar 7, 2024

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

8322477: order of subclasses in the permits clause can differ between compilations

Reviewed-by: mdoerr

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

  • bfaec80: 8325972: Add -x to bash for building with LOG=debug
  • e071843: 8326638: Crash in PhaseIdealLoop::remix_address_expressions due to unexpected Region instead of Loop
  • ad1d324: 8327036: [macosx-aarch64] SIGBUS in MarkActivationClosure::do_code_blob reached from Unsafe_CopySwapMemory0
  • 930344a: Merge
  • 29bf21f: 8322750: Test "api/java_awt/interactive/SystemTrayTests.html" failed because A blue ball icon is added outside of the system tray
  • 4244cb0: 8306040: HttpResponseInputStream.available() returns 1 on empty stream
  • d6ad625: 8324648: Avoid NoSuchMethodError when instantiating NativePRNG
  • 2d62854: 8320343: Generate GIF images for AbstractButton/5049549/bug5049549.java
  • fdbed07: 8325862: set -XX:+ErrorFileToStderr when executing java in containers for some container related jtreg tests
  • dbcce04: 8323519: Add applications/ctw/modules to Hotspot tiered testing
  • ... and 3 more: https://git.openjdk.org/jdk21u-dev/compare/4243aed45758772dc6ba24c65b2e15cedbf2bac5...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 ready Pull request is ready to be integrated and removed approval labels Mar 7, 2024
@GoeLin
Copy link
Member Author

GoeLin commented Mar 7, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Mar 7, 2024

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

  • 0b01feb: 8319757: java/nio/channels/DatagramChannel/InterruptibleOrNot.java failed: wrong exception thrown
  • e7994c1: 8303525: Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java
  • 5838aed: 8314824: Fix serviceability/jvmti/8036666/GetObjectLockCount.java to use vm flags
  • 45e20c5: 8311792: java/net/httpclient/ResponsePublisher.java fails intermittently with AssertionError: Found some outstanding operations
  • 2267292: 8310070: Test: javax/net/ssl/DTLS/DTLSWontNegotiateV10.java timed out
  • 47c67bd: 8309763: Move tests in test/jdk/sun/misc/URLClassPath directory to test/jdk/jdk/internal/loader
  • e328bf3: 8325024: java/security/cert/CertPathValidator/OCSP/OCSPTimeout.java incorrect comment information
  • 5c3dfe4: 8316563: test tools/jpackage/linux/LinuxResourceTest.java fails on CentOS Linux release 8.5.2111 and Fedora 27
  • e8d2535: 8315609: Open source few more swing text/html tests
  • 555f824: 8315898: Open source swing JMenu tests
  • ... and 13 more: https://git.openjdk.org/jdk21u-dev/compare/4243aed45758772dc6ba24c65b2e15cedbf2bac5...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 7, 2024

@GoeLin Pushed as commit d4823c2.

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

@GoeLin GoeLin deleted the goetz_backport_8322477 branch March 7, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants