use of org.sonar.server.util.cache.DiskCache in project sonarqube by SonarSource.
the class CloseIssuesOnRemovedComponentsVisitor method closeIssuesForDeletedComponentUuids.
private void closeIssuesForDeletedComponentUuids(Set<String> deletedComponentUuids) {
DiskCache<DefaultIssue>.DiskAppender<DefaultIssue> cacheAppender = issueCache.newAppender();
try {
for (String deletedComponentUuid : deletedComponentUuids) {
List<DefaultIssue> issues = baseIssuesLoader.loadForComponentUuid(deletedComponentUuid);
for (DefaultIssue issue : issues) {
issue.setBeingClosed(true);
// TODO should be renamed
issue.setOnDisabledRule(false);
issueLifecycle.doAutomaticTransition(issue);
cacheAppender.append(issue);
}
}
} finally {
cacheAppender.close();
}
}
Aggregations