aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/qualitymodel/QualityModelMeasuresVisitor.java6
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistSnapshotsStep.java6
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRuleFinder.java2
-rw-r--r--sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoader.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionXmlLoader.java2
7 files changed, 12 insertions, 12 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java
index 167755c60d9..deb747d94e4 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/IssueLifecycle.java
@@ -92,8 +92,8 @@ public class IssueLifecycle {
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());
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/qualitymodel/QualityModelMeasuresVisitor.java b/server/sonar-server/src/main/java/org/sonar/server/computation/qualitymodel/QualityModelMeasuresVisitor.java
index 6860cc81b47..747a2a108d2 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/qualitymodel/QualityModelMeasuresVisitor.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/qualitymodel/QualityModelMeasuresVisitor.java
@@ -311,9 +311,9 @@ public class QualityModelMeasuresVisitor extends PathAwareVisitorAdapter<Quality
}
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;
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistSnapshotsStep.java b/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistSnapshotsStep.java
index a059de34514..98ed3a10794 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistSnapshotsStep.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistSnapshotsStep.java
@@ -188,10 +188,10 @@ public class PersistSnapshotsStep implements ComputationStep {
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) {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRuleFinder.java b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRuleFinder.java
index 1182058e312..6e9ad5d0280 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRuleFinder.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRuleFinder.java
@@ -163,7 +163,7 @@ public class DefaultRuleFinder implements RuleFinder {
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();
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java b/sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java
index c68302f8a4a..4624d3cf94d 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java
+++ b/sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java
@@ -64,7 +64,7 @@ public class ResourceDao extends AbstractDao {
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);
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoader.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoader.java
index 13058659411..9be365feb29 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoader.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoader.java
@@ -74,7 +74,7 @@ public class RulesDefinitionAnnotationLoader {
}
}
- 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);
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionXmlLoader.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionXmlLoader.java
index 996a044d19b..6ee19d515bd 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionXmlLoader.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionXmlLoader.java
@@ -232,7 +232,7 @@ public class RulesDefinitionXmlLoader {
}
}
- 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;