List of usage examples for com.google.common.collect Multiset clear
void clear();
From source file:com.sonarsource.lits.DumpPhase.java
@VisibleForTesting private void createMissingIssues(SensorContext context, InputComponent resource) { Multiset<IssueKey> componentIssues = checker.getByComponentKey(resource.key()); if (!componentIssues.isEmpty()) { checker.disabled = true;/*from w ww .j a v a2 s.com*/ for (IssueKey issueKey : checker.getByComponentKey(resource.key())) { // missing issue => create checker.different = true; RuleKey ruleKey = RuleKey.parse(issueKey.ruleKey); ActiveRule activeRule = profile.getActiveRule(ruleKey.repository(), ruleKey.rule()); if (activeRule == null) { // rule not active => skip it checker.inactiveRule(issueKey.ruleKey); continue; } checker.differences++; NewIssue newIssue = context.newIssue(); NewIssueLocation location = newIssue.newLocation().on(resource).message("Missing"); if (issueKey.line != 0) { location.at(((InputFile) resource).selectLine(issueKey.line)); } newIssue.forRule(ruleKey).overrideSeverity(Severity.BLOCKER).at(location).save(); } checker.disabled = false; componentIssues.clear(); } }