aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch-protocol/src/main/java
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-08-26 14:20:53 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-08-26 14:21:44 +0200
commit5bba55cd38c983e09767246e777d8d317942ab5d (patch)
tree592b2e39c369cd8f84df17936e194ea4b6194929 /sonar-batch-protocol/src/main/java
parentbf24c787762e7cf53ef636c6d1e7782141b2812d (diff)
downloadsonarqube-5bba55cd38c983e09767246e777d8d317942ab5d.tar.gz
sonarqube-5bba55cd38c983e09767246e777d8d317942ab5d.zip
SONAR-5417 Handle permision error for project referential loader
Diffstat (limited to 'sonar-batch-protocol/src/main/java')
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/GlobalReferentials.java9
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java5
2 files changed, 6 insertions, 8 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/GlobalReferentials.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/GlobalReferentials.java
index 4a15c7042d2..4fa32d5d68b 100644
--- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/GlobalReferentials.java
+++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/GlobalReferentials.java
@@ -21,7 +21,6 @@ package org.sonar.batch.protocol.input;
import com.google.gson.Gson;
-import java.io.Reader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -41,7 +40,7 @@ public class GlobalReferentials {
return globalSettings;
}
- public GlobalReferentials addGlobalSetting(String key, String value){
+ public GlobalReferentials addGlobalSetting(String key, String value) {
globalSettings.put(key, value);
return this;
}
@@ -50,7 +49,7 @@ public class GlobalReferentials {
return metrics;
}
- public GlobalReferentials addMetric(Metric metric){
+ public GlobalReferentials addMetric(Metric metric) {
metrics.add(metric);
return this;
}
@@ -67,8 +66,8 @@ public class GlobalReferentials {
return new Gson().toJson(this);
}
- public static GlobalReferentials fromJson(Reader input) {
- return new Gson().fromJson(input, GlobalReferentials.class);
+ public static GlobalReferentials fromJson(String json) {
+ return new Gson().fromJson(json, GlobalReferentials.class);
}
}
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java
index 06109d82b11..6a8d5c8691e 100644
--- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java
+++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java
@@ -21,7 +21,6 @@ package org.sonar.batch.protocol.input;
import com.google.gson.Gson;
-import java.io.Reader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -83,8 +82,8 @@ public class ProjectReferentials {
return new Gson().toJson(this);
}
- public static ProjectReferentials fromJson(Reader input) {
- return new Gson().fromJson(input, ProjectReferentials.class);
+ public static ProjectReferentials fromJson(String json) {
+ return new Gson().fromJson(json, ProjectReferentials.class);
}
}