squid:S1319 - Declarations should use Java collection interfaces such as List rather than specific implementation classes such as LinkedList

This commit is contained in:
Mohammed Ezzat
2016-02-22 19:39:26 +02:00
parent c580b61df3
commit e4c34b1e22
11 changed files with 23 additions and 15 deletions

View File

@ -27,6 +27,7 @@ import org.junit.runners.Parameterized;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Date: 12/27/15 - 12:07 PM
@ -38,7 +39,7 @@ public class HobbitsTest extends WeatherObserverTest<Hobbits> {
@Parameterized.Parameters
public static Collection<Object[]> data() {
final ArrayList<Object[]> testData = new ArrayList<>();
final List<Object[]> testData = new ArrayList<>();
testData.add(new Object[]{WeatherType.SUNNY, "The happy hobbits bade in the warm sun."});
testData.add(new Object[]{WeatherType.RAINY, "The hobbits look for cover from the rain."});
testData.add(new Object[]{WeatherType.WINDY, "The hobbits hold their hats tightly in the windy weather."});

View File

@ -27,6 +27,7 @@ import org.junit.runners.Parameterized;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Date: 12/27/15 - 12:07 PM
@ -38,7 +39,7 @@ public class OrcsTest extends WeatherObserverTest<Orcs> {
@Parameterized.Parameters
public static Collection<Object[]> data() {
final ArrayList<Object[]> testData = new ArrayList<>();
final List<Object[]> testData = new ArrayList<>();
testData.add(new Object[]{WeatherType.SUNNY, "The sun hurts the orcs' eyes."});
testData.add(new Object[]{WeatherType.RAINY, "The orcs are dripping wet."});
testData.add(new Object[]{WeatherType.WINDY, "The orc smell almost vanishes in the wind."});

View File

@ -31,6 +31,7 @@ import org.junit.runners.Parameterized;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Date: 12/27/15 - 12:07 PM
@ -42,7 +43,7 @@ public class GHobbitsTest extends ObserverTest<GHobbits> {
@Parameterized.Parameters
public static Collection<Object[]> data() {
final ArrayList<Object[]> testData = new ArrayList<>();
final List<Object[]> testData = new ArrayList<>();
testData.add(new Object[]{WeatherType.SUNNY, "The happy hobbits bade in the warm sun."});
testData.add(new Object[]{WeatherType.RAINY, "The hobbits look for cover from the rain."});
testData.add(new Object[]{WeatherType.WINDY, "The hobbits hold their hats tightly in the windy weather."});

View File

@ -29,6 +29,7 @@ import org.junit.runners.Parameterized;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Date: 12/27/15 - 12:07 PM
@ -40,7 +41,7 @@ public class OrcsTest extends ObserverTest<GOrcs> {
@Parameterized.Parameters
public static Collection<Object[]> data() {
final ArrayList<Object[]> testData = new ArrayList<>();
final List<Object[]> testData = new ArrayList<>();
testData.add(new Object[]{WeatherType.SUNNY, "The sun hurts the orcs' eyes."});
testData.add(new Object[]{WeatherType.RAINY, "The orcs are dripping wet."});
testData.add(new Object[]{WeatherType.WINDY, "The orc smell almost vanishes in the wind."});