use of org.drools.workbench.services.verifier.api.client.reporting.CheckType in project drools-wb by kiegroup.
the class IssuesSet method mergeIssues.
private Optional<Issue> mergeIssues(final List<Issue> issues, final CheckType typeToMerge) {
Set<Issue> issuesToMerge = issues.stream().filter(issue -> issue.getCheckType() == typeToMerge).collect(Collectors.toSet());
Set<Integer> affectedRows = issuesToMerge.stream().flatMap(issue -> issue.getRowNumbers().stream()).sorted().collect(Collectors.toSet());
return issuesToMerge.stream().findFirst().map(issue -> new Issue(issue.getSeverity(), typeToMerge, affectedRows));
}
Aggregations