Multi Rule Properties with delimiter not possible
A source code analyzer
Brought to you by:
adangel,
juansotuyo
We have to provide multiple values to a rule property
<rule name="myRule" message="Do not place to this package. Move to {0} package/s instead." class="com.xenovation.codestyle.pmd.rest.RestResourceSpecificPackage"> <description>Please move your class to the right folder(rest folder)</description> <priority>2</priority> <properties> <property name="packageRegEx" value="com.aptsssss|com.abc" type="String[]" delimiter="|" description="valid packages"/> </properties>
The issue is, what the Property descriptor is not showing the attribute
delimiter nor is the default delimiter recognized properly.
We are getting a NullPointer in
BasicPropertyDescriptorFactory#delimiterIn()
It seems that neither the default delimiter nor a configured delimiter is working.
Workaround: fall back to a String property and split it manually in your rule.
Diff:
Will be fixed with the next version.