Issue #1566: partial fix of ReturnCount violations

This commit is contained in:
Ruslan Diachenko 2015-08-26 22:55:27 +01:00 committed by Roman Ivanov
parent 2af34e2adc
commit aa4e40e550
1 changed files with 8 additions and 7 deletions

View File

@ -440,17 +440,18 @@ public class SuppressionCommentFilter
* @return true if the source of event matches the text of this tag.
*/
public boolean isMatch(AuditEvent event) {
final Matcher tagMatcher =
tagCheckRegexp.matcher(event.getSourceName());
boolean match = false;
final Matcher tagMatcher = tagCheckRegexp.matcher(event.getSourceName());
if (tagMatcher.find()) {
if (tagMessageRegexp != null) {
final Matcher messageMatcher =
tagMessageRegexp.matcher(event.getMessage());
return messageMatcher.find();
final Matcher messageMatcher = tagMessageRegexp.matcher(event.getMessage());
match = messageMatcher.find();
}
else {
match = true;
}
return true;
}
return false;
return match;
}
/**