Simplify boolean expression.
@@ -35,9 +35,11 @@ public class AntJavacParser extends RegexpLineParser {
@Override
protected boolean isLineInteresting(final String line) {
- return super.isLineInteresting(line)
- && (line.contains("warning") || line.contains("error") || line.contains("\u8b66\u544a"))
- && !line.contains("@");
+ return super.isLineInteresting(line) && containsWarningPrefix(line) && !line.contains("@");
+ }
+
+ private boolean containsWarningPrefix(final String line) {
+ return line.contains("warning") || line.contains("error") || line.contains("\u8b66\u544a");
}
@Override
