pmd:CallSuperInConstructor - weird behaviors after update (sonar5.4, java3.11?) -> (sonar5.6.1, java4.2)

28 views
Skip to first unread message

oliver...@mindsatwork.com.br

unread,
Sep 6, 2016, 9:33:36 AM9/6/16
to SonarQube
Hi,

I updated recently and the rule pmd:CallSuperInConstructor started complaining about code that wasn't changed in ages. And the ruleset/quality profile wasn't changed either.

The rule now acuses errors on the snippets:

FIRST EXAMPLE
public MultipleErrorsException()
{
this( ( String ) null );
}// func

SECOND EXAMPLE:
public CommandWithBeanDataFromAlarmConfiguration()
{
super( ( Comparator ) null );
}// func

It seems the rule has problem when there is a cast being made inside the call to the super/this constructor.

Thanks,

Michael Gumowski

unread,
Sep 7, 2016, 3:27:46 AM9/7/16
to oliver...@mindsatwork.com.br, SonarQube
Hello,

The PMD plugin is only relying on the Java Analyzer in order to get bytecode and reporting issue. These aspects may have slightly changed between versions 3.11 and 4.2 of the Java Analyzer, but it should not have impacted PMD's rule behavior.

Did you also updated your PMD plugin? Maybe latest versions of the pmd plugin introduced regression on that rule. You may want to report the issue on the pmd project page directly, on on the pmd-plugin project page, as the plugin is now maintained by the community.

Cheers,

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/a7b36472-fd30-461c-bb77-577200e886fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages