jborgers / PMD-jPinpoint-rules

PMD rule set for responsible Java and Kotlin coding: performance, sustainability, multi-threading, data mixup and more.
Apache License 2.0
43 stars 10 forks source link

pmd7 fix request: AvoidImplicitlyRecompilingRegex matches in pmd6, not in pmd7 #392

Open stokpop opened 2 days ago

stokpop commented 2 days ago

This one matches in pmd6, not in pmd7:

!userId.matches(FooConstant.USER_REGEX)

There is however a check that says "assume remote contant for regex is ok". Should we turn that around: assume it is not ok? In this case the regex is:

public static final String USER_REGEX = "^USR\\d+$";