From: David Gageot Date: Fri, 25 May 2012 09:33:56 +0000 (+0200) Subject: Remove unused variables X-Git-Tag: 3.1~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5c2eb1b5e19f4999d483dbd4607e107e04c19ea4;p=sonarqube.git Remove unused variables --- diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/AbstractFilterDashboard.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/AbstractFilterDashboard.java index 7f824f9745e..60d35b21c9e 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/AbstractFilterDashboard.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/AbstractFilterDashboard.java @@ -19,13 +19,10 @@ */ package org.sonar.plugins.core.dashboards; -import org.sonar.plugins.core.widgets.FilterWidget; - -import org.sonar.api.web.Dashboard.Widget; - import org.sonar.api.web.Dashboard; import org.sonar.api.web.DashboardLayout; import org.sonar.api.web.DashboardTemplate; +import org.sonar.plugins.core.widgets.FilterWidget; /** * Base class for global dashboard containing a single @@ -42,7 +39,8 @@ abstract class AbstractFilterDashboard extends DashboardTemplate { .setGlobal(true) .setLayout(DashboardLayout.ONE_COLUMN); - Widget filterWidget = dashboard.addWidget("filter", 1) + dashboard + .addWidget("filter", 1) .setProperty(FilterWidget.FILTER, getFilterKey()); return dashboard; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java index 13b9fb66595..a199ffbceaf 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java @@ -66,7 +66,7 @@ public class ModelTest { public void shouldRemoveCharacteristic() { Model model = Model.create(); Characteristic efficiency = model.createCharacteristicByName("Efficiency"); - Characteristic usability = model.createCharacteristicByName("Usability"); + model.createCharacteristicByName("Usability"); assertThat(model.getCharacteristics().size(), is(2)); model.removeCharacteristic(efficiency); @@ -78,7 +78,7 @@ public class ModelTest { @Test public void shouldNotFailWhenRemovingUnknownCharacteristic() { Model model = Model.create(); - Characteristic efficiency = model.createCharacteristicByName("Efficiency"); + model.createCharacteristicByName("Efficiency"); model.removeCharacteristic(Characteristic.createByKey("foo", "Foo")); assertThat(model.getCharacteristics().size(), is(1)); } diff --git a/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java b/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java index 89959de4dcd..db46e42c30b 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java @@ -98,7 +98,7 @@ public class RegisterNewDashboardsTest { DashboardDto dashboardDto = task.register("Fake", fakeDashboardTemplate.createDashboard()); - verify(dashboardDao).insert(any(DashboardDto.class)); + verify(dashboardDao).insert(dashboardDto); verify(loadedTemplateDao).insert(eq(new LoadedTemplateDto("Fake", LoadedTemplateDto.DASHBOARD_TYPE))); }