LabelTypeHelper: Add null guard for excludedPaths
This fixes a warning from LGTM: Variable excludedPaths may be null here as suggested by this null guard. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
a6f23d164c
commit
8ea50e9a43
1 changed files with 6 additions and 4 deletions
|
@ -261,11 +261,13 @@ public class LabelTypeHelper {
|
|||
}
|
||||
return false;
|
||||
} else {
|
||||
final boolean match = !excludedPaths.matcher(path).matches();
|
||||
if (!match && logger.isDebugEnabled()) {
|
||||
logger.debug("Path " + path + " matched against the excludes paths expression " + excludedPaths.toString());
|
||||
if (excludedPaths != null && excludedPaths.matcher(path).matches()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Path " + path + " matched against the excludes paths expression " + excludedPaths.toString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return match;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue