From b32fa65e763b16e9dd00d31c8c0ce46a00286cc3 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 20 Jun 2014 14:25:38 +0200 Subject: [PATCH] Remove some unused code in event ws-client --- .../WEB-INF/app/controllers/api/events_controller.rb | 1 - .../main/java/org/sonar/wsclient/services/Event.java | 11 ----------- .../org/sonar/wsclient/services/EventCreateQuery.java | 1 - .../wsclient/unmarshallers/EventUnmarshaller.java | 3 +-- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb index 6c267b15133..c210a3dd9f1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb @@ -190,7 +190,6 @@ class Api::EventsController < Api::ApiController events = [] name = event.name category = event.category - description = event.description snapshots = Snapshot.find(:all, :include => 'events', :conditions => ["(root_snapshot_id = ? OR id = ?) AND scope = 'PRJ'", event.snapshot_id, event.snapshot_id]) snapshots.each do |snapshot| snapshot.events.reject {|e| e.name!=name || e.category!=category}.each do |event| diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java index d6595abc212..b7a5d90d537 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java @@ -32,7 +32,6 @@ public class Event extends Model { private String description; private String resourceKey; private Date date; - private String data; @CheckForNull public String getId() { @@ -94,16 +93,6 @@ public class Event extends Model { return this; } - @CheckForNull - public String getData() { - return data; - } - - public Event setData(@Nullable String data) { - this.data = data; - return this; - } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java index bdbc2a20fcb..bced338a48e 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java @@ -38,7 +38,6 @@ public class EventCreateQuery extends CreateQuery { appendUrlParameter(url, "category", event.getCategory()); appendUrlParameter(url, "name", event.getName()); appendUrlParameter(url, "description", event.getDescription()); - appendUrlParameter(url, "data", event.getData()); return url.toString(); } diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java index b9ef1c1eec6..44c329832a1 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java @@ -33,7 +33,6 @@ public class EventUnmarshaller extends AbstractUnmarshaller { .setName(utils.getString(json, "n")) .setCategory(utils.getString(json, "c")) .setDate(utils.getDateTime(json, "dt")) - .setDescription(utils.getString(json, "ds")) - .setData(utils.getString(json, "data")); + .setDescription(utils.getString(json, "ds")); } } -- 2.39.5