diff options
author | Artur Signell <artur@vaadin.com> | 2016-09-05 12:33:39 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2016-09-05 10:02:48 +0000 |
commit | 504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3 (patch) | |
tree | e65c1813439a25bbab6c81e71c27ba8ccf69970b /uitest-common | |
parent | 6941d683eb15a8ae10e0d302bcf9608be8825f8a (diff) | |
download | vaadin-framework-504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3.tar.gz vaadin-framework-504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3.zip |
Use diamond operator where it can be used
Does not modify compatibility packages to keep to closer to Vaadin 7.7
Change-Id: Ic9c4944eb90218290545a04ecd7455eb63910012
Diffstat (limited to 'uitest-common')
6 files changed, 10 insertions, 10 deletions
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java index 1c9982886d..dbfda17bfd 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -260,7 +260,7 @@ public abstract class AbstractTB3Test extends ParallelTest { * {@link #isPush()}. */ protected void openTestURL(Class<?> uiClass, String... parameters) { - openTestURL(uiClass, new HashSet<String>(Arrays.asList(parameters))); + openTestURL(uiClass, new HashSet<>(Arrays.asList(parameters))); } private void openTestURL(Class<?> uiClass, Set<String> parameters) { @@ -979,7 +979,7 @@ public abstract class AbstractTB3Test extends ParallelTest { protected List<String> getLogs() { VerticalLayoutElement log = $(VerticalLayoutElement.class).id("Log"); List<LabelElement> logLabels = log.$(LabelElement.class).all(); - List<String> logTexts = new ArrayList<String>(); + List<String> logTexts = new ArrayList<>(); for (LabelElement label : logLabels) { logTexts.add(label.getText()); diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/MultiBrowserTest.java index cef11a69bd..1193ba9334 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/MultiBrowserTest.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/MultiBrowserTest.java @@ -97,7 +97,7 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration { protected List<DesiredCapabilities> getBrowserCapabilities( Browser... browsers) { - List<DesiredCapabilities> capabilities = new ArrayList<DesiredCapabilities>(); + List<DesiredCapabilities> capabilities = new ArrayList<>(); for (Browser browser : browsers) { capabilities.add(browser.getDesiredCapabilities()); } diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParallelScheduler.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParallelScheduler.java index 100ee83918..e270e26c53 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParallelScheduler.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParallelScheduler.java @@ -31,7 +31,7 @@ import org.junit.runners.model.RunnerScheduler; * @author Vaadin Ltd */ public class ParallelScheduler implements RunnerScheduler { - private final List<Future<Object>> fResults = new ArrayList<Future<Object>>(); + private final List<Future<Object>> fResults = new ArrayList<>(); private ExecutorService fService; /** diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java index 83aba8a3f9..25261584d2 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java @@ -48,7 +48,7 @@ public class ParameterizedTB3Runner extends TB3Runner { protected List<FrameworkMethod> computeTestMethods() { List<FrameworkMethod> methods = super.computeTestMethods(); - Map<Method, Collection<String>> parameters = new LinkedHashMap<Method, Collection<String>>(); + Map<Method, Collection<String>> parameters = new LinkedHashMap<>(); // Find all @Parameters methods and invoke them to find out permutations @@ -108,7 +108,7 @@ public class ParameterizedTB3Runner extends TB3Runner { // Add method permutations for all @Parameters for (Method setter : parameters.keySet()) { - List<FrameworkMethod> newMethods = new ArrayList<FrameworkMethod>(); + List<FrameworkMethod> newMethods = new ArrayList<>(); for (FrameworkMethod m : methods) { if (!(m instanceof TBMethod)) { diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java index aea24c6727..ffc4ec9043 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java @@ -98,7 +98,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test { */ @Before public void setupScreenComparisonParameters() { - screenshotFailures = new ArrayList<String>(); + screenshotFailures = new ArrayList<>(); Parameters.setScreenshotErrorDirectory(getScreenshotErrorDirectory()); Parameters.setScreenshotReferenceDirectory( @@ -133,7 +133,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test { File mainReference = getScreenshotReferenceFile(identifier); List<File> referenceFiles = findReferenceAndAlternatives(mainReference); - List<File> failedReferenceFiles = new ArrayList<File>(); + List<File> failedReferenceFiles = new ArrayList<>(); for (File referenceFile : referenceFiles) { boolean match = false; @@ -275,7 +275,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test { * given files, including the given reference */ private List<File> findReferenceAndAlternatives(File reference) { - List<File> files = new ArrayList<File>(); + List<File> files = new ArrayList<>(); files.add(reference); File screenshotDir = reference.getParentFile(); diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java index 5733ac4f27..8635477491 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java @@ -67,7 +67,7 @@ public class TB3TestLocator { */ protected <T> List<Class<? extends T>> findClasses(Class<T> baseClass, String basePackage, String[] ignoredPackages) throws IOException { - List<Class<? extends T>> classes = new ArrayList<Class<? extends T>>(); + List<Class<? extends T>> classes = new ArrayList<>(); String basePackageDirName = "/" + basePackage.replace('.', '/'); URL location = baseClass.getResource(basePackageDirName); if (location.getProtocol().equals("file")) { |