void processIssue(Issue issue, Period period) { if (isOnPeriod((DefaultIssue) issue, period)) { Rating rating = RATING_BY_SEVERITY.get(issue.severity()); if (issue.type().equals(BUG)) { newRatingValueByMetric.get(NEW_RELIABILITY_RATING_KEY).increment(rating); } else if (issue.type().equals(VULNERABILITY)) { newRatingValueByMetric.get(NEW_SECURITY_RATING_KEY).increment(rating); } } }
private void processIssues(Component component, Path<Counter> path) { componentIssuesRepository.getIssues(component) .stream() .filter(issue -> issue.resolution() == null) .filter(issue -> issue.type().equals(BUG) || issue.type().equals(VULNERABILITY)) .forEach(issue -> path.current().processIssue(issue, periodHolder.getPeriod())); }
private void processIssues(Component component, Path<Counter> path) { componentIssuesRepository.getIssues(component) .stream() .filter(issue -> issue.resolution() == null) .forEach(issue -> { Rating rating = RATING_BY_SEVERITY.get(issue.severity()); if (issue.type().equals(BUG)) { path.current().ratingValueByMetric.get(RELIABILITY_RATING_KEY).increment(rating); } else if (issue.type().equals(VULNERABILITY)) { path.current().ratingValueByMetric.get(SECURITY_RATING_KEY).increment(rating); } }); }
void processIssue(Issue issue, Period period) { if (isOnPeriod((DefaultIssue) issue, period)) { Rating rating = RATING_BY_SEVERITY.get(issue.severity()); if (issue.type().equals(BUG)) { newRatingValueByMetric.get(NEW_RELIABILITY_RATING_KEY).increment(rating); } else if (issue.type().equals(VULNERABILITY)) { newRatingValueByMetric.get(NEW_SECURITY_RATING_KEY).increment(rating); } } }
private void processIssues(Component component, Path<Counter> path) { componentIssuesRepository.getIssues(component) .stream() .filter(issue -> issue.resolution() == null) .filter(issue -> issue.type().equals(BUG) || issue.type().equals(VULNERABILITY)) .forEach(issue -> path.current().processIssue(issue, periodHolder.getPeriod())); }
private void processIssues(Component component, Path<Counter> path) { componentIssuesRepository.getIssues(component) .stream() .filter(issue -> issue.resolution() == null) .forEach(issue -> { Rating rating = RATING_BY_SEVERITY.get(issue.severity()); if (issue.type().equals(BUG)) { path.current().ratingValueByMetric.get(RELIABILITY_RATING_KEY).increment(rating); } else if (issue.type().equals(VULNERABILITY)) { path.current().ratingValueByMetric.get(SECURITY_RATING_KEY).increment(rating); } }); }