Menu

#1316 Multi Rule Properties with delimiter not possible

PMD-5.3.0
closed
None
PMD
3-Major
Bug
2015-04-01
2015-02-28
No

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.

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-02-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,3 +20,5 @@
    
     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.
    
     
  • Andreas Dangel

    Andreas Dangel - 2015-03-07

    Will be fixed with the next version.

     
  • Andreas Dangel

    Andreas Dangel - 2015-03-07
    • status: in-progress --> closed
     

Log in to post a comment.