summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-12-09 22:40:42 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2013-12-09 22:40:42 +0100
commit17a671936ca5a556a1896d37fd9c46a0aa05726e (patch)
tree1520e14def20955fff34ba6b27c34df60a957a08
parentf0cbff8e9697dd5cb4999eee5e6f92871eacdfe2 (diff)
downloadsonarqube-17a671936ca5a556a1896d37fd9c46a0aa05726e.tar.gz
sonarqube-17a671936ca5a556a1896d37fd9c46a0aa05726e.zip
Fix some quality flaws
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java1
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java4
-rw-r--r--sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Progress.java5
3 files changed, 7 insertions, 3 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java b/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java
index 5cec83e94b7..e1f03be4c78 100644
--- a/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java
+++ b/sonar-core/src/main/java/org/sonar/core/issue/workflow/IssueWorkflow.java
@@ -153,6 +153,7 @@ public class IssueWorkflow implements BatchComponent, ServerComponent, Startable
@Override
public void stop() {
+ // nothing to do
}
public boolean doTransition(DefaultIssue issue, String transitionKey, IssueChangeContext issueChangeContext) {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
index 4c427ebe684..1a2780b7846 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
@@ -378,14 +378,18 @@ public class Settings implements BatchComponent, ServerComponent {
}
protected void doOnSetProperty(String key, @Nullable String value) {
+ // can be overridden
}
protected void doOnRemoveProperty(String key) {
+ // can be overridden
}
protected void doOnClearProperties() {
+ // can be overridden
}
protected void doOnGetProperties(String key) {
+ // can be overridden
}
}
diff --git a/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Progress.java b/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Progress.java
index c21f017bef1..7673ac2621f 100644
--- a/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Progress.java
+++ b/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Progress.java
@@ -23,7 +23,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.TimerTask;
-import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
/**
@@ -58,8 +57,8 @@ class Progress extends TimerTask {
public void run() {
long totalIssues = counter.get();
long durationMinutes = (System.currentTimeMillis() - start) / 60000L;
- int percents = (int)((100L * totalIssues) / totalViolations);
- if (totalIssues>0 && durationMinutes > 0) {
+ int percents = (int) ((100L * totalIssues) / totalViolations);
+ if (totalIssues > 0 && durationMinutes > 0) {
int frequency = (int) (totalIssues / durationMinutes);
long remaining = (totalViolations - totalIssues) / frequency;
logger.info(String.format(