Unused imports on Java15 records while they're actually used

Problem is in sonar cloud I’m getting unused imports warnings for all imports in the project, while these imports are needed, I don’t know why sonar thinks they’re not.

Note: The project is a multimodule project, but I configured sonar correctly and it’s running and publishing the notes just fine. Also the project works fine with sonarqube on local machine.


  • Github
  • Github actions
  • Java 15 with preview features (records)

Hello @IsmailMarmoush,

Welcome in our commuity.

Unfortunately, our java analyzer is not yet able to support Java 15. That’s why you are getting all these issues on the records from your project. Our parser simply fails as soon as it reaches the record unknown (so far) keyword.

Our analyzer is built on eclipse ECJ, which does not yet support officially Java 15 (they have a beta branch), and we are therefore waiting for their full support to integrate it, which should happen with their next release, mid-December.

For the moment, here is the ticket we use to track the progress: SONARJAVA-3505


1 Like

Thanks a lot @Michael for your reply, ok then at least it’s not wrong configs on my side.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.