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

Closed stokpop closed 2 weeks ago

stokpop commented 4 weeks 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+$";
stokpop commented 2 weeks ago

As discussed, we will assume remote constants as OK.