updater.setPastLine(raw, base.getLine());
updater.setPastLocations(raw, base.getLocations());
updater.setPastMessage(raw, base.getMessage(), changeContext);
- updater.setPastGap(raw, base.effortToFix(), changeContext);
- updater.setPastEffort(raw, base.debt(), changeContext);
+ updater.setPastGap(raw, base.gap(), changeContext);
+ updater.setPastEffort(raw, base.effort(), changeContext);
raw.setSelectedAt(base.selectedAt());
}
}
private static long getEffortForNotMinorIssue(Issue issue) {
- Duration debt = issue.debt();
- if (!issue.severity().equals(Severity.INFO) && debt != null) {
- return debt.toMinutes();
+ Duration effort = issue.effort();
+ if (!issue.severity().equals(Severity.INFO) && effort != null) {
+ return effort.toMinutes();
}
return 0L;
}
private void addToCache(Component component, SnapshotDto snapshotDto) {
dbIdsRepository.setSnapshotId(component, snapshotDto.getId());
}
- }
- private void persist(SnapshotDto snapshotDto, DbSession dbSession) {
- dbClient.snapshotDao().insert(dbSession, snapshotDto);
+ private void persist(SnapshotDto snapshotDto, DbSession dbSession) {
+ dbClient.snapshotDao().insert(dbSession, snapshotDto);
+ }
}
private static String getFileQualifier(Component component) {
return rules;
}
- private org.sonar.api.rules.Rule toRule(RuleDto rule, List<RuleParamDto> params) {
+ private static org.sonar.api.rules.Rule toRule(RuleDto rule, List<RuleParamDto> params) {
String severity = rule.getSeverityString();
String description = rule.getDescription();
RuleDto.Format descriptionFormat = rule.getDescriptionFormat();
return null;
}
- private List<ResourceDto> getResources(ResourceQuery query, SqlSession session) {
+ private static List<ResourceDto> getResources(ResourceQuery query, SqlSession session) {
return session.getMapper(ResourceMapper.class).selectResources(query);
}
}
}
- private RulesDefinition.NewRule loadRule(RulesDefinition.NewExtendedRepository repo, Class clazz, org.sonar.check.Rule ruleAnnotation) {
+ private static RulesDefinition.NewRule loadRule(RulesDefinition.NewExtendedRepository repo, Class clazz, org.sonar.check.Rule ruleAnnotation) {
String ruleKey = StringUtils.defaultIfEmpty(ruleAnnotation.key(), clazz.getCanonicalName());
String ruleName = StringUtils.defaultIfEmpty(ruleAnnotation.name(), null);
String description = StringUtils.defaultIfEmpty(ruleAnnotation.description(), null);
}
}
- private void processRule(RulesDefinition.NewRepository repo, SMInputCursor ruleC) throws XMLStreamException {
+ private static void processRule(RulesDefinition.NewRepository repo, SMInputCursor ruleC) throws XMLStreamException {
String key = null;
String name = null;
String description = null;