]> source.dussan.org Git - sonarqube.git/commitdiff
Remove unused variables
authorDavid Gageot <david@gageot.net>
Fri, 25 May 2012 09:33:56 +0000 (11:33 +0200)
committerDavid Gageot <david@gageot.net>
Fri, 25 May 2012 09:33:56 +0000 (11:33 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/AbstractFilterDashboard.java
sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java
sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java

index 7f824f9745e60f89d24be404607adfc3acf5200d..60d35b21c9eed88a05957848bfc52c8aa7ad941b 100644 (file)
  */
 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;
index 13b9fb66595d99ee5f432011c3e3efdaa67cfbb3..a199ffbceaf33da785192b2137ea8d4e4271b42e 100644 (file)
@@ -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));
   }
index 89959de4dcde59045976e9bed5f2b87afc343f45..db46e42c30b037c44ec0b920bea87642b685d59e 100644 (file)
@@ -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)));
   }