summaryrefslogtreecommitdiffstats
path: root/server/sonar-ws-client
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-10 00:01:22 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-10 00:01:23 +0200
commit736c775bfc2cde38a53e4d43f858d3a3b6728c34 (patch)
treecaee18e0a6007e19e8ee81d64a2b1e8dfe17a847 /server/sonar-ws-client
parent7d562d641868532e5edbd6f03fac739eff9bcc90 (diff)
downloadsonarqube-736c775bfc2cde38a53e4d43f858d3a3b6728c34.tar.gz
sonarqube-736c775bfc2cde38a53e4d43f858d3a3b6728c34.zip
Add missing @Override annotations
Diffstat (limited to 'server/sonar-ws-client')
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultActionPlan.java11
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultBulkChange.java3
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssue.java21
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java3
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChangeDiff.java3
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java1
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueComment.java4
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java16
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java2
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshaller.java2
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerSetupUnmarshaller.java2
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java2
12 files changed, 70 insertions, 0 deletions
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultActionPlan.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultActionPlan.java
index 8e12f27479a..26730eafc47 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultActionPlan.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultActionPlan.java
@@ -40,23 +40,28 @@ public class DefaultActionPlan implements ActionPlan {
/**
* Unique key
*/
+ @Override
public String key() {
return JsonUtils.getString(json, "key");
}
+ @Override
public String project() {
return JsonUtils.getString(json, "project");
}
+ @Override
public String name() {
return JsonUtils.getString(json, "name");
}
+ @Override
@CheckForNull
public String description() {
return JsonUtils.getString(json, "desc");
}
+ @Override
public String status() {
return JsonUtils.getString(json, "status");
}
@@ -64,28 +69,34 @@ public class DefaultActionPlan implements ActionPlan {
/**
* Login of the user who created the action plan.
*/
+ @Override
public String userLogin() {
return JsonUtils.getString(json, "userLogin");
}
+ @Override
@CheckForNull
public Date deadLine() {
return JsonUtils.getDateTime(json, "deadLine");
}
+ @Override
public Date createdAt() {
return JsonUtils.getDateTime(json, "createdAt");
}
+ @Override
public Date updatedAt() {
return JsonUtils.getDateTime(json, "updatedAt");
}
+ @Override
@CheckForNull
public Integer totalIssues() {
return JsonUtils.getInteger(json, "totalIssues");
}
+ @Override
@CheckForNull
public Integer unresolvedIssues() {
return JsonUtils.getInteger(json, "unresolvedIssues");
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultBulkChange.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultBulkChange.java
index 9ce9b5e3c08..62f9c9562c7 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultBulkChange.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultBulkChange.java
@@ -36,15 +36,18 @@ public class DefaultBulkChange implements BulkChange {
private Integer totalIssuesNotChanged;
private final List<String> issuesNotChangedKeys = new ArrayList<String>();
+ @Override
public List<String> issuesNotChangedKeys() {
return issuesNotChangedKeys;
}
+ @Override
@CheckForNull
public Integer totalIssuesChanged() {
return totalIssuesChanged;
}
+ @Override
@CheckForNull
public Integer totalIssuesNotChanged() {
return totalIssuesNotChanged;
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssue.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssue.java
index a86f9e35cbd..4492c919ab5 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssue.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssue.java
@@ -41,45 +41,55 @@ public class DefaultIssue implements Issue {
/**
* Unique key
*/
+ @Override
public String key() {
return JsonUtils.getString(json, "key");
}
+ @Override
public Long componentId() {
return JsonUtils.getLong(json, "componentId");
}
+ @Override
public String componentKey() {
return JsonUtils.getString(json, "component");
}
+ @Override
public String projectKey() {
return JsonUtils.getString(json, "project");
}
+ @Override
public String ruleKey() {
return JsonUtils.getString(json, "rule");
}
+ @Override
public String severity() {
return JsonUtils.getString(json, "severity");
}
+ @Override
@CheckForNull
public String message() {
return JsonUtils.getString(json, "message");
}
+ @Override
@CheckForNull
public Integer line() {
return JsonUtils.getInteger(json, "line");
}
+ @Override
@CheckForNull
public String debt() {
return JsonUtils.getString(json, "debt");
}
+ @Override
public String status() {
return JsonUtils.getString(json, "status");
}
@@ -87,11 +97,13 @@ public class DefaultIssue implements Issue {
/**
* The resolution type. Null if the issue is not resolved.
*/
+ @Override
@CheckForNull
public String resolution() {
return JsonUtils.getString(json, "resolution");
}
+ @Override
@CheckForNull
public String reporter() {
return JsonUtils.getString(json, "reporter");
@@ -100,6 +112,7 @@ public class DefaultIssue implements Issue {
/**
* Login of assignee. Null if issue is not assigned.
*/
+ @Override
@CheckForNull
public String assignee() {
return JsonUtils.getString(json, "assignee");
@@ -108,34 +121,41 @@ public class DefaultIssue implements Issue {
/**
* SCM account
*/
+ @Override
@CheckForNull
public String author() {
return JsonUtils.getString(json, "author");
}
+ @Override
@CheckForNull
public String actionPlan() {
return JsonUtils.getString(json, "actionPlan");
}
+ @Override
public Date creationDate() {
return JsonUtils.getDateTime(json, "creationDate");
}
+ @Override
public Date updateDate() {
return JsonUtils.getDateTime(json, "updateDate");
}
+ @Override
@CheckForNull
public Date closeDate() {
return JsonUtils.getDateTime(json, "closeDate");
}
+ @Override
@CheckForNull
public String attribute(String key) {
return attributes().get(key);
}
+ @Override
public Map<String, String> attributes() {
Map<String, String> attr = (Map<String, String>) json.get("attr");
if (attr == null) {
@@ -147,6 +167,7 @@ public class DefaultIssue implements Issue {
/**
* Non-null list of comments
*/
+ @Override
public List<IssueComment> comments() {
List<IssueComment> comments = new ArrayList<IssueComment>();
List<Map> jsonComments = (List<Map>) json.get("comments");
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java
index 42b5285645c..b7e7ecf6626 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChange.java
@@ -39,14 +39,17 @@ public class DefaultIssueChange implements IssueChange {
this.json = json;
}
+ @Override
public String user() {
return JsonUtils.getString(json, "user");
}
+ @Override
public Date creationDate() {
return JsonUtils.getDateTime(json, "creationDate");
}
+ @Override
public List<IssueChangeDiff> diffs() {
List<IssueChangeDiff> diffs = new ArrayList<IssueChangeDiff>();
List<Map> jsonDiffs = (List<Map>) json.get("diffs");
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChangeDiff.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChangeDiff.java
index c2273701b43..e74b7c17cf6 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChangeDiff.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueChangeDiff.java
@@ -37,16 +37,19 @@ public class DefaultIssueChangeDiff implements IssueChangeDiff {
this.json = json;
}
+ @Override
public String key() {
return JsonUtils.getString(json, "key");
}
+ @Override
@CheckForNull
public Object newValue() {
return parseValue("newValue");
}
+ @Override
@CheckForNull
public Object oldValue() {
return parseValue("oldValue");
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java
index e37a111fffd..024f5dd0e0a 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java
@@ -45,6 +45,7 @@ public class DefaultIssueClient implements IssueClient {
this.parser = new IssueJsonParser();
}
+ @Override
public Issues find(IssueQuery query) {
String json = requestFactory.get(SEARCH_URL, query.urlParams());
return parser.parseIssues(json);
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueComment.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueComment.java
index 7b89aef9ab1..103bb942773 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueComment.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueComment.java
@@ -35,18 +35,22 @@ public class DefaultIssueComment implements IssueComment {
this.json = json;
}
+ @Override
public String key() {
return JsonUtils.getString(json, "key");
}
+ @Override
public String htmlText() {
return JsonUtils.getString(json, "htmlText");
}
+ @Override
public String login() {
return JsonUtils.getString(json, "login");
}
+ @Override
public Date createdAt() {
return JsonUtils.getDateTime(json, "createdAt");
}
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java
index 39e5ecbfffb..cfacd6111a0 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssues.java
@@ -47,72 +47,88 @@ public class DefaultIssues implements Issues {
private Paging paging;
private Boolean maxResultsReached;
+ @Override
public List<Issue> list() {
return list;
}
+ @Override
public int size() {
return list.size();
}
+ @Override
public Collection<Rule> rules() {
return rulesByKey.values();
}
+ @Override
public Rule rule(Issue issue) {
return rulesByKey.get(issue.ruleKey());
}
+ @Override
public Collection<User> users() {
return usersByKey.values();
}
+ @Override
@CheckForNull
public User user(String login) {
return usersByKey.get(login);
}
+ @Override
public Collection<Component> components() {
return componentsByKey.values();
}
+ @Override
@CheckForNull
public Component component(Issue issue) {
return componentsByKey.get(issue.componentKey());
}
+ @Override
@CheckForNull
public Component componentById(long id) {
return componentsById.get(id);
}
+ @Override
@CheckForNull
public Component componentByKey(String key) {
return componentsByKey.get(key);
}
+ @Override
public Collection<Component> projects() {
return projectsByKey.values();
}
+ @Override
@CheckForNull
public Component project(Issue issue) {
return projectsByKey.get(issue.projectKey());
}
+ @Override
public Collection<ActionPlan> actionPlans() {
return actionPlansByKey.values();
}
+ @Override
@CheckForNull
public ActionPlan actionPlans(Issue issue) {
return actionPlansByKey.get(issue.actionPlan());
}
+ @Override
public Paging paging() {
return paging;
}
+ @Override
@Nullable
public Boolean maxResultsReached() {
return maxResultsReached;
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java
index 1a4c2abe4c2..db0918e4146 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java
@@ -27,6 +27,7 @@ import java.util.List;
public abstract class AbstractUnmarshaller<M extends Model> implements Unmarshaller<M> {
+ @Override
public final M toModel(String json) {
WSUtils utils = WSUtils.getINSTANCE();
M result = null;
@@ -45,6 +46,7 @@ public abstract class AbstractUnmarshaller<M extends Model> implements Unmarshal
}
+ @Override
public final List<M> toModels(String json) {
WSUtils utils = WSUtils.getINSTANCE();
List<M> result = new ArrayList<M>();
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshaller.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshaller.java
index 6be57d09231..fd9d3a2fe7a 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshaller.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshaller.java
@@ -26,6 +26,7 @@ import java.util.List;
public class AuthenticationUnmarshaller implements Unmarshaller<Authentication> {
+ @Override
public Authentication toModel(String json) {
WSUtils utils = WSUtils.getINSTANCE();
Object map = utils.parse(json);
@@ -34,6 +35,7 @@ public class AuthenticationUnmarshaller implements Unmarshaller<Authentication>
return new Authentication().setValid(validJson != null ? validJson : false);
}
+ @Override
public List<Authentication> toModels(String json) {
throw new UnsupportedOperationException();
}
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerSetupUnmarshaller.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerSetupUnmarshaller.java
index ae72b1324a9..318a88594d6 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerSetupUnmarshaller.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerSetupUnmarshaller.java
@@ -28,6 +28,7 @@ import java.util.List;
* @since 2.9
*/
public class ServerSetupUnmarshaller implements Unmarshaller<ServerSetup> {
+ @Override
public ServerSetup toModel(String json) {
WSUtils utils = WSUtils.getINSTANCE();
Object map = utils.parse(json);
@@ -36,6 +37,7 @@ public class ServerSetupUnmarshaller implements Unmarshaller<ServerSetup> {
.setMessage(utils.getString(map, "msg"));
}
+ @Override
public List<ServerSetup> toModels(String json) {
throw new UnsupportedOperationException();
}
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java
index 0951e2d28d3..0949eaadf25 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java
@@ -28,6 +28,7 @@ import java.util.List;
* @author Evgeny Mandrikov
*/
public class ServerUnmarshaller implements Unmarshaller<Server> {
+ @Override
public Server toModel(String json) {
WSUtils utils = WSUtils.getINSTANCE();
Object map = utils.parse(json);
@@ -42,6 +43,7 @@ public class ServerUnmarshaller implements Unmarshaller<Server> {
return server;
}
+ @Override
public List<Server> toModels(String json) {
throw new UnsupportedOperationException();
}