aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java10
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateProvider.java2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java2
-rw-r--r--sonar-markdown/src/main/java/org/sonar/markdown/HtmlBlockquoteChannel.java6
4 files changed, 12 insertions, 8 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java b/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java
index 722be550697..e10254c4894 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java
@@ -107,7 +107,7 @@ public class NodeHealth {
}
public String getProcessCpuPercent() {
- return formatPercent(Long.valueOf(cpuPercent), 100L);
+ return formatPercent(cpuPercent, 100L);
}
void setOpenFiles(long avgOpenFileDescriptors) {
@@ -175,6 +175,10 @@ public class NodeHealth {
// Uptime
setJvmUptimeMillis(nodesStats.getJvm().getUptime().getMillis());
+ initPerformanceStats(nodesStats);
+ }
+
+ private void initPerformanceStats(NodeStats nodesStats) {
// Performance Stat
performanceStats = new ArrayList<Performance>();
@@ -249,13 +253,13 @@ public class NodeHealth {
.setValue(filterCacheEviction));
}
- static public class Performance {
+ public static class Performance {
public static enum Status {
OK, WARN, ERROR
}
- final private String name;
+ private final String name;
private String message;
private double value;
private double warnThreshold;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateProvider.java b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateProvider.java
index 5333c767ee1..4ede40d4ed9 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateProvider.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/QualityGateProvider.java
@@ -84,7 +84,7 @@ public class QualityGateProvider extends ProviderAdapter {
private QualityGate fetch(String qualityGateSetting, ServerClient client, MetricFinder metricFinder) {
String jsonText = null;
try {
- long qGateId = Long.valueOf(qualityGateSetting);
+ long qGateId = Long.parseLong(qualityGateSetting);
jsonText = client.request(SHOW_URL + "?id=" + qGateId, false);
} catch (NumberFormatException configIsNameInsteadOfId) {
jsonText = client.request(SHOW_URL + "?name=" + qualityGateSetting, false);
diff --git a/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java b/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java
index 7fc5fc7a6e6..008822ec40f 100644
--- a/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java
@@ -86,7 +86,7 @@ public class QualityGateConditionDto {
private long metricId;
- private transient String metricKey;
+ private String metricKey;
private Integer period;
diff --git a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlBlockquoteChannel.java b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlBlockquoteChannel.java
index da1594d9a30..67acf60e22d 100644
--- a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlBlockquoteChannel.java
+++ b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlBlockquoteChannel.java
@@ -62,12 +62,12 @@ class HtmlBlockquoteChannel extends Channel<MarkdownOutput> {
private class QuotedLineElementChannel extends RegexChannel<MarkdownOutput> {
- protected QuotedLineElementChannel() {
+ private QuotedLineElementChannel() {
super("&gt;\\s[^\r\n]*+");
}
@Override
- protected void consume(CharSequence token, MarkdownOutput output) {
+ public void consume(CharSequence token, MarkdownOutput output) {
if (!pendingBlockConstruction) {
output.append("<blockquote>");
pendingBlockConstruction = true;
@@ -101,7 +101,7 @@ class HtmlBlockquoteChannel extends Channel<MarkdownOutput> {
}
@Override
- protected void consume(CharSequence token, MarkdownOutput output) {
+ public void consume(CharSequence token, MarkdownOutput output) {
output.append(token);
}
}