Xiaoven / codegex

A light-weight tools like spotbugs
GNU Lesser General Public License v2.1
1 stars 0 forks source link

False Negative for RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN #60

Closed Xiaoven closed 3 years ago

Xiaoven commented 3 years ago

link

if (isHidden == null || isHidden == Boolean.FALSE) {
                final boolean matched = template.patterns().stream().anyMatch(patternMatchPredicate);
                if (matched) {
                    matchedTemplates.add(template);
                }
            }

用 regex.search 找到第一个匹配就返回了