Disable the MissingOverride check for Java 5 code
This commit is contained in:
parent
340a333ba7
commit
a6d9b41b98
@ -10,7 +10,8 @@ import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck;
|
||||
|
||||
public class SuppressionFilter extends AutomaticBean implements Filter {
|
||||
|
||||
private FilterSet filters = new FilterSet();
|
||||
private static final Pattern JAVA5PATTERN = Pattern.compile("[\\\\/]org[\\\\/]jboss[\\\\/]");
|
||||
|
||||
private Pattern pattern;
|
||||
private Pattern examplePattern = Pattern.compile("examples?");
|
||||
|
||||
@ -24,6 +25,12 @@ public class SuppressionFilter extends AutomaticBean implements Filter {
|
||||
|
||||
@Override
|
||||
public boolean accept(AuditEvent evt) {
|
||||
if (JAVA5PATTERN.matcher(evt.getFileName()).find()) {
|
||||
if (evt.getSourceName().endsWith("MissingOverrideCheck")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (pattern.matcher(evt.getFileName()).find()) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user