aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-04-27 17:05:35 +0200
committerDavid Gageot <david@gageot.net>2012-04-27 17:05:35 +0200
commitb150482f1f4ea43bc42b324994d1d1e852de6320 (patch)
tree4638118d9a32405ad844c127f38e381d9ef37ae8 /sonar-ws-client
parent328e826a6a151128783ee7a3939e206202c6a990 (diff)
downloadsonarqube-b150482f1f4ea43bc42b324994d1d1e852de6320.tar.gz
sonarqube-b150482f1f4ea43bc42b324994d1d1e852de6320.zip
Code cleaning : Add @Override annotations
Diffstat (limited to 'sonar-ws-client')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java2
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java4
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java4
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java1
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java2
5 files changed, 13 insertions, 0 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java
index 2d5e5cef509..3643750f43c 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java
@@ -33,11 +33,13 @@ import java.util.Set;
public final class JdkUtils extends WSUtils {
+ @Override
public String format(Date date, String format) {
SimpleDateFormat dateFormat = new SimpleDateFormat(format);
return dateFormat.format(date);
}
+ @Override
public String encodeUrl(String url) {
try {
return URLEncoder.encode(url, "UTF-8");
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java
index aa1d4677a43..dfd615778cb 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java
@@ -69,18 +69,22 @@ public class HttpClient3Connector extends Connector {
}
}
+ @Override
public String execute(Query<?> query) {
return executeRequest(newGetRequest(query));
}
+ @Override
public String execute(CreateQuery<?> query) {
return executeRequest(newPostRequest(query));
}
+ @Override
public String execute(UpdateQuery<?> query) {
return executeRequest(newPutRequest(query));
}
+ @Override
public String execute(DeleteQuery query) {
return executeRequest(newDeleteRequest(query));
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java
index 5c7521091d9..40d216d8944 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java
@@ -70,18 +70,22 @@ public class HttpClient4Connector extends Connector {
this.server = server;
}
+ @Override
public String execute(Query<?> query) {
return executeRequest(newGetMethod(query));
}
+ @Override
public String execute(CreateQuery<?> query) {
return executeRequest(newPostMethod(query));
}
+ @Override
public String execute(UpdateQuery<?> query) {
return executeRequest(newPutMethod(query));
}
+ @Override
public String execute(DeleteQuery query) {
return executeRequest(newDeleteMethod(query));
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java
index c550ec0afb5..473e9f4bfb2 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java
@@ -26,6 +26,7 @@ import org.sonar.wsclient.services.WSUtils;
public class TimeMachineUnmarshaller extends AbstractUnmarshaller<TimeMachine> {
+ @Override
protected TimeMachine parse(Object json) {
WSUtils utils = WSUtils.getINSTANCE();
Object cols = utils.getField(json, "cols");
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java
index 23b1a205ec8..49ce5918fef 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java
@@ -123,10 +123,12 @@ public class SonarTest {
}
static class EmptyQuery extends Query<Metric> {
+ @Override
public String getUrl() {
return "/api/empty";
}
+ @Override
public Class<Metric> getModelClass() {
return Metric.class;
}