From 7d5701e0a327448484ccee968e12ae3d9162d407 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Tue, 12 May 2015 10:42:31 +0200 Subject: Useless code --- .../test/java/org/sonar/api/measures/PropertiesBuilderTest.java | 8 ++++---- .../src/test/java/org/sonar/api/user/UserQueryTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sonar-plugin-api/src/test') diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java index d540ddb1a61..f7e89fd07f3 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java @@ -27,7 +27,7 @@ import org.junit.Test; public class PropertiesBuilderTest { @Test public void buildMeasure() { - PropertiesBuilder builder = new PropertiesBuilder(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); + PropertiesBuilder builder = new PropertiesBuilder<>(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); Measure measure = builder .add(1, 30) .add(2, 27) @@ -39,7 +39,7 @@ public class PropertiesBuilderTest { @Test public void sortKeys() { - PropertiesBuilder builder = new PropertiesBuilder(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); + PropertiesBuilder builder = new PropertiesBuilder<>(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); Measure measure = builder .add("foo", "fooooo") .add("bar", "baaaaar") @@ -51,7 +51,7 @@ public class PropertiesBuilderTest { @Test public void valueIsOptional() { - PropertiesBuilder builder = new PropertiesBuilder(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); + PropertiesBuilder builder = new PropertiesBuilder<>(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); Measure measure = builder .add("foo", null) .add("bar", "bar") @@ -63,7 +63,7 @@ public class PropertiesBuilderTest { @Test public void clearBeforeBuildingOtherMeasure() { - PropertiesBuilder builder = new PropertiesBuilder(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); + PropertiesBuilder builder = new PropertiesBuilder<>(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION); builder .add("foo", "foo") .add("bar", "bar") diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java index fa36ab4986b..ddc5e569528 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java @@ -56,7 +56,7 @@ public class UserQueryTest { @Test public void should_limit_number_of_logins() { - List logins = new ArrayList(); + List logins = new ArrayList<>(); for (int i = 0; i < 1010; i++) { logins.add(String.valueOf(i)); } -- cgit v1.2.3