Custom rule test failed after updating sonar-java

Hello Community

After updating the sonar-java version from to one of our custom rule test is failing. Our custom rule checks if the certain object “” is created:

  public void visitNewClass(NewClassTree tree) {
    if (tree.symbolType().is("")) {

Before the version update our custom rule was able to identify the full qualified name of the created object. After the update it only returns the object name, in this case “Cursor”.

Is it possible to access the full qualified name in a different way?

I am using:

SonarQube: 7.9.4

Thank you very much and stay healthy!

Hello @tlg,

Between version 6.0 and 6.8 we completely reworked the way we verify tests. It is probably what causes the issue. In your case, you are probably now missing the bytecode corresponding to eclipse swt library, which would be required by the engine to correctly resolve the type.

This answer from Quentin is probably going to help you:


1 Like

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