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

8266036: class file for sun.misc.Contended not found #4428

Closed
wants to merge 1 commit into from

Conversation

@lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Jun 9, 2021

The ct.sym may contain classfiles referring to annotations that are not present in ct.sym (liek JDK's internal annotation sun.misc.Contended). If javac will try to load them (while discovering annotations for the purpose of detecting which annotation processors should be run), an error will be produced (please see the issue). The proposal is to strip annotations that are not present in ct.sym when generating ct.sym.


Progress

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

Issue

  • JDK-8266036: class file for sun.misc.Contended not found

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4428/head:pull/4428
$ git checkout pull/4428

Update a local copy of the PR:
$ git checkout pull/4428
$ git pull https://git.openjdk.java.net/jdk pull/4428/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4428

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4428.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jun 9, 2021

👋 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.

Loading

@openjdk openjdk bot added the rfr label Jun 9, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 9, 2021

@lahodaj The following labels will be automatically applied to this pull request:

  • build
  • compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 9, 2021

Webrevs

Loading

@AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Jun 9, 2021

Seems to be linked to the wrong issue, the issue you want is JDK-8266036.

Loading

@lahodaj lahodaj changed the title 8266035: class file for sun.misc.Contended not found 8266036: class file for sun.misc.Contended not found Jun 9, 2021
@lahodaj
Copy link
Contributor Author

@lahodaj lahodaj commented Jun 9, 2021

Seems to be linked to the wrong issue, the issue you want is JDK-8266036.

Yes, sorry for the wrong issue. Fixed now.

Thanks for noticing!

Loading

"Ljdk/internal/javac/PreviewFeature;";
private static final String PREVIEW_FEATURE_ANNOTATION_INTERNAL =
"Ljdk/internal/PreviewFeature+Annotation;";
public static final Set<String> HARDCODED_ANNOTATIONS = new HashSet<>(
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle Jun 10, 2021

Choose a reason for hiding this comment

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

shouldn't PREVIEW_FEATURE_ANNOTATION_INTERNAL be added to HARDCODED_ANNOTATIONS too?

Loading

Copy link
Contributor Author

@lahodaj lahodaj Jun 11, 2021

Choose a reason for hiding this comment

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

The *_INTERNAL annotation(s) only exists in ct.sym and are injected after the annotations are filtered, so I think it does not need to be in HARDCODED_ANNOTATION.

Loading

@jddarcy
Copy link
Member

@jddarcy jddarcy commented Jun 10, 2021

Does jdk.internal.ValueBased also need special handling? See JDK-8258421.

Loading

@lahodaj
Copy link
Contributor Author

@lahodaj lahodaj commented Jun 11, 2021

Does jdk.internal.ValueBased also need special handling? See JDK-8258421.

@jddarcy, you are right, there needs to be special handling for it.

I have created a new PR for JDK 17 here:
openjdk/jdk17#27

It should also include the special handling for ValueBased and should solve JDK-8258421. If we have more special annotations interpreted directly by javac, we may eventually need a more general way to handle them.

Loading

@lahodaj lahodaj closed this Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants