Hi,
I try to use the pmd plugin for maven2 but it fails with the error :
Embedded error: Failure executing PMD for: ... MyClass.java
Encountered "{ variable =" at line 13, column 3.
Was expecting one of:
"abstract" ...
"boolean" ...
My class looks like that :
public class MyClass extends AnOtherClass {
{
variable = someValue;
}
}
I know this kind of code is not recommended but I need to keep it. So I
wonder how I can make it work without changing my code.
I try to use a custom ruleset to exclude the rule that seems to trigger the
error :
<rule ref="rulesets/design.xml">
<exclude name="NonStaticInitializer"/>
</rule>
but it doesn't work much better.
If anyone can help !
Thanks.