From 61388ef867ca83f58636499231105f78e4fbbbcb Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 6 Oct 2015 15:01:27 +0200 Subject: Fix some quality flaws --- .../main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java | 3 +-- .../src/main/java/org/sonar/server/ui/ws/GlobalNavigationAction.java | 2 +- .../src/main/java/org/sonar/server/ui/ws/SettingsNavigationAction.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java index 9847442329f..a4f7debdffa 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java @@ -49,7 +49,6 @@ import org.sonar.db.dashboard.ActiveDashboardDao; import org.sonar.db.dashboard.DashboardDto; import org.sonar.db.property.PropertyDto; import org.sonar.db.property.PropertyQuery; -import org.sonar.server.activity.ws.ActivitiesWs; import org.sonar.server.component.ComponentFinder; import org.sonar.server.computation.ws.ActivityWsAction; import org.sonar.server.ui.ViewProxy; @@ -178,7 +177,7 @@ public class ComponentNavigationAction implements NavigationWsAction { json.endArray(); } - private String getPageUrl(ViewProxy page, ComponentDto component) { + private static String getPageUrl(ViewProxy page, ComponentDto component) { String result; String componentKey = encodeComponentKey(component); if (page.isController()) { diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/GlobalNavigationAction.java b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/GlobalNavigationAction.java index 748d4bd18d8..5e50dd7ef8d 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/GlobalNavigationAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/GlobalNavigationAction.java @@ -78,7 +78,7 @@ public class GlobalNavigationAction implements NavigationWsAction { json.endObject().close(); } - private void writeDashboards(JsonWriter json, List dashboards) { + private static void writeDashboards(JsonWriter json, List dashboards) { json.name("globalDashboards").beginArray(); for (DashboardDto dashboard : dashboards) { json.beginObject() diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/SettingsNavigationAction.java b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/SettingsNavigationAction.java index bba8ce6de58..d2daca17dc7 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/SettingsNavigationAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/SettingsNavigationAction.java @@ -83,7 +83,7 @@ public class SettingsNavigationAction implements NavigationWsAction { json.endObject().close(); } - private String getPageUrl(ViewProxy page) { + private static String getPageUrl(ViewProxy page) { return page.isController() ? page.getId() : String.format("/plugins/configuration/%s", page.getId()); } } -- cgit v1.2.3