Skip to content

Commit c9d10f5

Browse files
committed
accept methodName==null (bug in PMD in generic methods)
1 parent c25f835 commit c9d10f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

code-assert-core/src/main/java/guru/nidi/codeassert/config/LocationMatcher.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public boolean matches(String packageName, String className, String methodName)
5555
final boolean matchesClass = matchesAll(loc.method)
5656
? matchesClassPattern(loc.clazz, className)
5757
: matchesPattern(loc.clazz, className);
58-
return matchesPattern(loc.pack, packageName) && matchesClass && matchesPattern(loc.method, methodName);
58+
return matchesPattern(loc.pack, packageName) && matchesClass &&
59+
matchesPattern(loc.method, methodName == null ? "" : methodName);
5960
}
6061

6162
public boolean matchesLanguage(Language language) {

0 commit comments

Comments
 (0)