ClassCastException during a java scan for rule s1643


While parsing my java project, I have a class for which I have a ClassCastException, for rule S1643 :
java.lang.ClassCastException: class cannot be cast to class ( and are in unnamed module of loader org.sonar.classloader.ClassRealm @6e46d9f4)

Attached the complete stacktrace:
stacktrace analyse error.txt (8.0 KB)

  • Sonarscanner cli, openjdk 11, sonarqube 8.9 enterprise, source java 8
  • The error occurs while parsing the project, but just parsing the class can reproduce it.
  • Analysis done under linux and windows

Do you have an idea of the problem ? or is it a scanner bug?

Thank You.

Hi Julien, good catch, it’s a nasty bug. I created SONARJAVA-3856. Thanks for your feedback.


ok, thanks for the consideration.



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