summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/ListenerOrder.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestBench.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectJump.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/Menubars.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationWaiAria.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/data/DataProviderRefresh.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java10
31 files changed, 69 insertions, 52 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
index a4719be6ec..db23287d88 100644
--- a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
@@ -1,6 +1,7 @@
package com.vaadin.tests;
import java.util.HashMap;
+import java.util.Map;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
@@ -23,7 +24,7 @@ public class ListenerOrder extends com.vaadin.server.LegacyApplication
Select s1;
- HashMap<String, Integer> buttonListeners = new HashMap<>();
+ Map<String, Integer> buttonListeners = new HashMap<>();
@Override
public void init() {
diff --git a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
index 91d62a9b83..40353ad83c 100644
--- a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
@@ -17,6 +17,7 @@
package com.vaadin.tests;
import java.util.ArrayList;
+import java.util.List;
import com.vaadin.ui.AbstractOrderedLayout;
import com.vaadin.ui.Button;
@@ -37,7 +38,7 @@ public class OrderedLayoutSwapComponents extends CustomComponent {
private final AbstractOrderedLayout main;
- ArrayList<MyComponent> order = new ArrayList<>();
+ List<MyComponent> order = new ArrayList<>();
public OrderedLayoutSwapComponents() {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestBench.java b/uitest/src/main/java/com/vaadin/tests/TestBench.java
index 7de6e4e2c5..388a113768 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestBench.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestBench.java
@@ -276,7 +276,7 @@ public class TestBench extends com.vaadin.server.LegacyApplication
*/
public static List<Class<?>> getTestableClassesForPackage(
String packageName) throws Exception {
- final ArrayList<File> directories = new ArrayList<>();
+ final List<File> directories = new ArrayList<>();
try {
final ClassLoader cld = Thread.currentThread()
.getContextClassLoader();
@@ -295,7 +295,7 @@ public class TestBench extends com.vaadin.server.LegacyApplication
packageName + " does not appear to be a valid package.");
}
- final ArrayList<Class<?>> classes = new ArrayList<>();
+ final List<Class<?>> classes = new ArrayList<>();
// For every directory identified capture all the .class files
for (final File directory : directories) {
if (directory.exists()) {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
index 0ad4c5545b..8c5bc83561 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
@@ -18,6 +18,7 @@ package com.vaadin.tests;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import com.vaadin.server.ExternalResource;
import com.vaadin.ui.Button;
@@ -93,7 +94,7 @@ public class TestForChildComponentRendering extends CustomComponent {
public void randomReorder() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<>();
+ final List<Component> components = new ArrayList<>();
while (it.hasNext()) {
components.add(it.next());
}
@@ -110,7 +111,7 @@ public class TestForChildComponentRendering extends CustomComponent {
public void removeRandomComponent() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<>();
+ final List<Component> components = new ArrayList<>();
while (it.hasNext()) {
components.add(it.next());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
index 1088ba00a2..8c2d83da30 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
@@ -18,6 +18,7 @@ package com.vaadin.tests;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import com.vaadin.server.ExternalResource;
import com.vaadin.ui.Button;
@@ -94,7 +95,7 @@ public class TestForGridLayoutChildComponentRendering extends CustomComponent {
public void randomReorder() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<>();
+ final List<Component> components = new ArrayList<>();
while (it.hasNext()) {
components.add(it.next());
}
@@ -118,7 +119,7 @@ public class TestForGridLayoutChildComponentRendering extends CustomComponent {
public void removeRandomComponent() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<>();
+ final List<Component> components = new ArrayList<>();
while (it.hasNext()) {
components.add(it.next());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java b/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
index c2d910ec26..74dcd40ba1 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
@@ -18,6 +18,7 @@ package com.vaadin.tests;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
@@ -43,7 +44,7 @@ public class TestForMultipleStyleNames extends CustomComponent
private final TwinColSelect s = new TwinColSelect();
- private ArrayList<String> styleNames2;
+ private List<String> styleNames2;
public TestForMultipleStyleNames() {
setCompositionRoot(main);
@@ -82,7 +83,7 @@ public class TestForMultipleStyleNames extends CustomComponent
final String currentStyle = l.getStyleName();
final String[] tmp = currentStyle.split(" ");
- final ArrayList<String> curStyles = new ArrayList<>();
+ final List<String> curStyles = new ArrayList<>();
for (int i = 0; i < tmp.length; i++) {
if (tmp[i] != "") {
curStyles.add(tmp[i]);
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
index 68856973fd..9a45be4712 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import com.vaadin.server.LegacyApplication;
import com.vaadin.server.ThemeResource;
@@ -233,7 +234,7 @@ public class TestSizeableIncomponents extends LegacyApplication {
class Testable {
private Class<?> classToTest;
- private ArrayList<Configuration> configurations = new ArrayList<>();
+ private List<Configuration> configurations = new ArrayList<>();
Testable(Class<?> c) {
classToTest = c;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
index 591bf599cb..a8b62bd7c2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
@@ -66,7 +66,7 @@ public abstract class ComponentTestCase<T extends AbstractComponent>
* @return A List with actions to which more actions can be added.
*/
protected List<Component> createActions() {
- ArrayList<Component> actions = new ArrayList<>();
+ List<Component> actions = new ArrayList<>();
actions.add(createEnabledAction(true));
actions.add(createReadonlyAction(false));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java
index 6b72db4091..7558771969 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java
@@ -5,6 +5,7 @@ import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.List;
import java.util.Locale;
import com.vaadin.data.HasValue.ValueChangeEvent;
@@ -124,8 +125,7 @@ public abstract class AbstractFieldTest<T extends AbstractField<V>, V>
// Sort collections to avoid problems with values printed in
// different order
try {
- ArrayList<Comparable> c = new ArrayList<Comparable>(
- (Collection) o);
+ List<Comparable> c = new ArrayList<Comparable>((Collection) o);
Collections.sort(c);
o = c;
} catch (Exception e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java
index fd0e815ec9..18ecfaf53b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java
@@ -154,8 +154,7 @@ public abstract class LegacyAbstractFieldTest<T extends AbstractField>
// Sort collections to avoid problems with values printed in
// different order
try {
- ArrayList<Comparable> c = new ArrayList<Comparable>(
- (Collection) o);
+ List<Comparable> c = new ArrayList<Comparable>((Collection) o);
Collections.sort(c);
o = c;
} catch (Exception e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java
index 625f94d426..a1a8449a93 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java
@@ -16,6 +16,7 @@
package com.vaadin.tests.components.grid;
import java.util.ArrayList;
+import java.util.List;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
@@ -37,7 +38,7 @@ public class GridDefaultSelectionMode extends AbstractTestUI {
person2.setFirstName("person");
person2.setLastName("two");
- ArrayList<Person> items = new ArrayList<>();
+ List<Person> items = new ArrayList<>();
items.add(person1);
items.add(person2);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
index 48f8f814d3..400ff5266c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
@@ -17,6 +17,7 @@ package com.vaadin.tests.components.grid;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import java.util.Random;
import com.vaadin.server.VaadinRequest;
@@ -44,7 +45,7 @@ public class GridEditorUI extends AbstractReindeerTestUIWithLog {
protected Collection<Person> createTestData(int size) {
Random r = new Random(0);
- ArrayList<Person> testData = new ArrayList<>();
+ List<Person> testData = new ArrayList<>();
for (int i = 0; i < size; i++) {
Person person = new Person();
person.setFirstName(TestDataGenerator.getFirstName(r));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectJump.java b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectJump.java
index fa5c151c79..83f3ef2317 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectJump.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectJump.java
@@ -1,6 +1,7 @@
package com.vaadin.tests.components.listselect;
import java.util.ArrayList;
+import java.util.List;
import com.vaadin.server.VaadinRequest;
import com.vaadin.shared.ui.ContentMode;
@@ -21,7 +22,7 @@ public class ListSelectJump extends AbstractReindeerTestUI {
+ "<li>Leave the Option #10 visible in the scroll window</li><li>Press the button</li></ol>"
+ "You will see the <code>ListSelect</code> scroll window jump back to the top.",
ContentMode.HTML));
- ArrayList<String> list = new ArrayList<>();
+ List<String> list = new ArrayList<>();
for (int i = 1; i <= 25; i++) {
list.add("Option #" + i);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/Menubars.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/Menubars.java
index dd3c5cecb8..b1a7a6a8c9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/Menubars.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/Menubars.java
@@ -78,7 +78,7 @@ public class Menubars extends ComponentTestCase<MenuBar> {
@Override
protected List<Component> createActions() {
- ArrayList<Component> actions = new ArrayList<>();
+ List<Component> actions = new ArrayList<>();
actions.add(createErrorIndicatorAction(false));
actions.add(createEnabledAction(true));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
index f3cb05d158..2be125a917 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
@@ -213,7 +213,7 @@ public class BoxLayoutTest extends AbstractReindeerTestUI {
controls.addComponent(cell);
cell.addComponent(new Label("Cell"));
- ArrayList<Alignment> alignments = new ArrayList<>();
+ List<Alignment> alignments = new ArrayList<>();
alignments.addAll(Arrays.asList(Alignment.TOP_LEFT,
Alignment.MIDDLE_LEFT, Alignment.BOTTOM_LEFT,
Alignment.TOP_CENTER, Alignment.MIDDLE_CENTER,
@@ -342,7 +342,8 @@ public class BoxLayoutTest extends AbstractReindeerTestUI {
componentError.addValueChangeListener(event -> {
if (target != null) {
target.setComponentError(componentError.getValue()
- ? new UserError("Error message") : null);
+ ? new UserError("Error message")
+ : null);
}
});
component.addComponent(componentError);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java b/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java
index 5b04c31db8..e9ddb52ab6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java
@@ -5,6 +5,7 @@ import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.HashMap;
+import java.util.Map;
import com.vaadin.shared.ui.ContentMode;
import com.vaadin.tests.components.TestBase;
@@ -57,7 +58,7 @@ public class EditableTableLeak extends TestBase {
}
private static class CachingFieldFactory extends DefaultFieldFactory {
- private final HashMap<Object, HashMap<Object, Field<?>>> cache = new HashMap<>();
+ private final Map<Object, Map<Object, Field<?>>> cache = new HashMap<>();
@Override
public Field<?> createField(Container container, Object itemId,
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.java b/uitest/src/main/java/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.java
index 4c3dba7ee0..b9a9ddd7e8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.java
@@ -72,7 +72,7 @@ public class SetDataSourceWithPropertyIds extends AbstractReindeerTestUI {
table.setVisibleColumns("jobId");
label.setValue("no Exception");
} catch (CacheUpdateException e) {
- ArrayList<String> propertyIds = new ArrayList<>();
+ List<String> propertyIds = new ArrayList<>();
propertyIds.add("jobId");
table.setContainerDataSource(jobContainer, propertyIds);
label.setValue("Exception caught");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
index abc549e4bd..4b9f4455eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
@@ -105,7 +105,7 @@ public class TableReduceContainerSize extends TestBase {
}
private static List<TestObject> createData(int count) {
- ArrayList<TestObject> data = new ArrayList<>(count);
+ List<TestObject> data = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
data.add(new TestObject("string-" + i, new Date(), i));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java
index fb10ad0c15..19dcf30d37 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java
@@ -71,7 +71,7 @@ public class FirstTabNotVisibleWhenTabsheetNotClipped
TabSheet tabsheet = new TabSheet();
String[] letters = { "A", "B", "C", "D" };
- HashMap<String, TabSheet.Tab> tabMap = new HashMap<>();
+ Map<String, TabSheet.Tab> tabMap = new HashMap<>();
for (String letter : letters) {
VerticalLayout vLayout = new VerticalLayout();
@@ -100,7 +100,7 @@ public class FirstTabNotVisibleWhenTabsheetNotClipped
}
private Button.ClickListener createTabListener(
- final HashMap<String, TabSheet.Tab> map, final TabSheet tabsheet) {
+ final Map<String, TabSheet.Tab> map, final TabSheet tabsheet) {
Button.ClickListener clickListener = new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
index 63530fac1c..36365993ce 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
@@ -1,6 +1,7 @@
package com.vaadin.tests.components.tabsheet;
import java.util.ArrayList;
+import java.util.List;
import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
@@ -31,7 +32,7 @@ import com.vaadin.v7.ui.TextField;
public class TabKeyboardNavigation extends AbstractReindeerTestUI {
int index = 1;
- ArrayList<Component> tabs = new ArrayList<>();
+ List<Component> tabs = new ArrayList<>();
TabSheet ts = new TabSheet();
Log focusblur = new Log(10);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationWaiAria.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationWaiAria.java
index adf5667bc1..404794608f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationWaiAria.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationWaiAria.java
@@ -1,6 +1,7 @@
package com.vaadin.tests.components.tabsheet;
import java.util.ArrayList;
+import java.util.List;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
@@ -17,7 +18,7 @@ import com.vaadin.v7.ui.TextField;
public class TabKeyboardNavigationWaiAria extends AbstractReindeerTestUI {
int index = 1;
- ArrayList<Component> tabs = new ArrayList<>();
+ List<Component> tabs = new ArrayList<>();
TabSheet ts = new TabSheet();
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
index 8eba127abd..c2b7cbf91c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
@@ -18,6 +18,7 @@ package com.vaadin.tests.components.window;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.List;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Attribute;
@@ -165,7 +166,7 @@ public class WindowCloseShortcuts extends AbstractTestUI {
}
private String elementToHtml(Element producedElem, StringBuilder sb) {
- ArrayList<String> names = new ArrayList<>();
+ List<String> names = new ArrayList<>();
for (Attribute a : producedElem.attributes().asList()) {
names.add(a.getKey());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java b/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
index ac423b3700..618543aab9 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
@@ -3,6 +3,7 @@ package com.vaadin.tests.containers.filesystemcontainer;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.List;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.Log;
@@ -120,7 +121,7 @@ public class FileSystemContainerInTreeTable extends TestBase {
if (c instanceof Container.Indexed) {
return ((Container.Indexed) source).indexOfId(itemId);
} else {
- ArrayList<Object> list = new ArrayList<>(source.getItemIds());
+ List<Object> list = new ArrayList<>(source.getItemIds());
return list.indexOf(itemId);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/data/DataProviderRefresh.java b/uitest/src/main/java/com/vaadin/tests/data/DataProviderRefresh.java
index 5e7fd6672e..a9a25a88ea 100644
--- a/uitest/src/main/java/com/vaadin/tests/data/DataProviderRefresh.java
+++ b/uitest/src/main/java/com/vaadin/tests/data/DataProviderRefresh.java
@@ -99,7 +99,7 @@ public class DataProviderRefresh extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
Grid<Bean> grid = new Grid<>();
- ArrayList<Bean> arrayList = new ArrayList<>();
+ List<Bean> arrayList = new ArrayList<>();
Bean foo = new Bean("Foo", 10);
arrayList.add(foo);
arrayList.add(new Bean("Baz", 11));
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
index 9087b80944..86451975ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
@@ -8,6 +8,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Map;
import java.util.Set;
import com.vaadin.event.Action;
@@ -297,7 +298,7 @@ public class DDTest6 extends TestBase {
static class FolderView extends DragAndDropWrapper implements DropHandler {
- static final HashMap<Folder, FolderView> views = new HashMap<>();
+ static final Map<Folder, FolderView> views = new HashMap<>();
public static FolderView get(Folder f) {
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
index 92f18ceffe..e6c45ae9c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
@@ -3,6 +3,8 @@ package com.vaadin.tests.dd;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
@@ -133,7 +135,7 @@ public class TreeDragStart extends TestBase {
table.setDragMode(TableDragMode.ROW);
// Initialize the table container
- ArrayList<InventoryObject> collection = new ArrayList<>();
+ List<InventoryObject> collection = new ArrayList<>();
collection.add(new InventoryObject("Dummy Item", 0.0, false));
final BeanItemContainer<InventoryObject> tableContainer = new BeanItemContainer<>(
collection);
@@ -238,11 +240,10 @@ public class TreeDragStart extends TestBase {
}
}
- HashMap<String, InventoryObject> inventoryStore = new HashMap<>();
+ Map<String, InventoryObject> inventoryStore = new HashMap<>();
public HierarchicalContainer createTreeContent() {
- final Object[] inventory = {
- new InventoryObject("root", 0.0, true),
+ final Object[] inventory = { new InventoryObject("root", 0.0, true),
new InventoryObject("+5 Quarterstaff (blessed)", 3.5, false),
new InventoryObject("+3 Elven Dagger (blessed)", 0.2, false),
new InventoryObject("+5 Helmet (greased)", 1.5, false),
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java b/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
index fb56b5226b..34c4449556 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
@@ -21,6 +21,7 @@ package com.vaadin.tests.push;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.List;
import com.vaadin.shared.communication.PushMode;
import com.vaadin.shared.ui.ContentMode;
@@ -69,7 +70,7 @@ public class PushConfigurator extends VerticalLayout {
private void refreshStatus() {
PushConfiguration pc = ui.getPushConfiguration();
String value = "";
- ArrayList<String> names = new ArrayList<>();
+ List<String> names = new ArrayList<>();
names.addAll(pc.getParameterNames());
Collections.sort(names);
for (String param : names) {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java b/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
index a94e53a924..bdb73234ba 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
@@ -3,6 +3,7 @@ package com.vaadin.tests.util;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import java.util.Random;
import com.vaadin.v7.data.util.BeanItemContainer;
@@ -14,17 +15,17 @@ public class PersonContainer extends BeanItemContainer<Person>
/**
* Natural property order for Person bean. Used in tables and forms.
*/
- public static final Object[] NATURAL_COL_ORDER = { "firstName",
- "lastName", "email", "phoneNumber", "address.streetAddress",
+ public static final Object[] NATURAL_COL_ORDER = { "firstName", "lastName",
+ "email", "phoneNumber", "address.streetAddress",
"address.postalCode", "address.city" };
/**
* "Human readable" captions for properties in same order as in
* NATURAL_COL_ORDER.
*/
- public static final String[] COL_HEADERS_ENGLISH = {
- "First name", "Last name", "Email", "Phone number",
- "Street Address", "Postal Code", "City" };
+ public static final String[] COL_HEADERS_ENGLISH = { "First name",
+ "Last name", "Email", "Phone number", "Street Address",
+ "Postal Code", "City" };
public PersonContainer() {
super(Person.class);
@@ -49,7 +50,7 @@ public class PersonContainer extends BeanItemContainer<Person>
public static Collection<Person> createTestData(int size) {
Random r = new Random(0);
- ArrayList<Person> testData = new ArrayList<>();
+ List<Person> testData = new ArrayList<>();
for (int i = 0; i < size; i++) {
Person p = new Person();
p.setFirstName(TestDataGenerator.getFirstName(r));
diff --git a/uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java b/uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java
index 750e0a4223..3b11e18849 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java
@@ -1,13 +1,14 @@
package com.vaadin.tests.util;
import java.util.HashMap;
+import java.util.Map;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
public class TestClickListener implements Button.ClickListener {
- private static final HashMap<String, Integer> buttonListeners = new HashMap<>();
+ private static final Map<String, Integer> buttonListeners = new HashMap<>();
String name = "";
int count = 0;
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
index 0c13cea90c..797aed66cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
@@ -207,7 +207,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
Arrays.asList(simpleBean, updatedSimpleBean));
updatedComplexBean.setPrivimite(complexBean.getPrivimite() + 1);
- ArrayList<SimpleTestBean> arrayList = new ArrayList<>(
+ List<SimpleTestBean> arrayList = new ArrayList<>(
Arrays.asList(array));
Collections.reverse(arrayList);
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java
index 806c639998..d41df99886 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java
@@ -142,9 +142,8 @@ public class GridBasicClientFeaturesWidget
@Override
public void save(EditorRequest<List<Data>> request) {
if (secondEditorError) {
- request.failure(
- "Syntethic fail of editor in column 2. "
- + "This message is so long that it doesn't fit into its box",
+ request.failure("Syntethic fail of editor in column 2. "
+ + "This message is so long that it doesn't fit into its box",
Collections.<Column<?, List<Data>>> singleton(
grid.getColumn(2)));
return;
@@ -821,8 +820,7 @@ public class GridBasicClientFeaturesWidget
}
private void createScrollToRowMenu() {
- String[] menupath = { "Component", "State", "Scroll to...",
- null };
+ String[] menupath = { "Component", "State", "Scroll to...", null };
for (int i = 0; i < ROWS; i += 100) {
menupath[3] = "Row " + i + "...";
@@ -980,7 +978,7 @@ public class GridBasicClientFeaturesWidget
@Override
public void execute() {
List<Column<?, List<Data>>> cols = grid.getColumns();
- ArrayList<Column> reordered = new ArrayList<>(cols);
+ List<Column> reordered = new ArrayList<>(cols);
final int index = cols.indexOf(column);
if (index == 0) {
Column<?, List<Data>> col = reordered.remove(0);