question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add javax.annotation.processing.Generated for Java 9

See original GitHub issue

Java 9 replaces javax.annotation.Generated with javax.annotation.processing.Generated, with the former removed for compatibility. The former is not compatible with JDK9 due to split packages (Jigsaw modules).

Unlike other static analyzers, Google’s ErrorProne does not support excluding directories from analysis. Instead it uses the above annotations as an ignore rule. Since neither are generated any longer, the rules are enforced. Other analyzers are likely to follow this idiom as they become Java 9 compatible.

It would be nice to have an option to enable this annotation, with the correct one chosen based on the Java version.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
joelittlejohncommented, Aug 22, 2018

Happy to reopen this.

1reaction
cyclotomic18commented, Mar 1, 2021

I opened pull request #1202

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generated (Java SE 9 & JDK 9 ) - Oracle Help Center
The Generated annotation is used to mark source code that has been generated. It can also be used to differentiate user written code...
Read more >
Maven update in Java 9, Maven compile in Java 8 in Eclipse
The class is: javax.annotation.Generated (Java 8). This is the class to import. However when I do a maven update the import of the...
Read more >
Code gen of Generated annotation should work with Java 9+
In JDK 8, class "Generated" is at "javax.annotation.Generated". But after 9+, it has been moved to "javax.annotation.processing.
Read more >
Building :paging:integration-tests:testapp with JDK 17 fails ...
Actually #3 is unlikely to be true. It seems that we are trying to use javax.annotation.processing.Generated which is a JDK 9 class. Given...
Read more >
Kapt, Java 9+, Dagger 2.9: "ClassNotFoundException: javax ...
Kapt, Java 9+, Dagger 2.9: "ClassNotFoundException: javax.annotation.Generated". 6. Relates to 1. Relates to 1 issue (0 unresolved).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found