private boolean isViolation ( String severity ) { if ( "error" . equals ( severity ) ) { return "error" . equals ( violationSeverity ) || "warning" . equals ( violationSeverity ) || "info" . equals ( violationSeverity ) ; } else if ( "warning" . equals ( severity ) ) { return "warning" . equals ( violationSeverity ) || "info" . equals ( violationSeverity ) ; } else if ( "info" . equals ( severity ) ) { return "info" . equals ( violationSeverity ) ; } else { return false ; } }
Checks if the given severity is considered a violation .