aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-23 08:45:49 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-23 09:45:49 +0300
commit40d15b32e341a38dacc24cc3ec79ab3ff0a25a50 (patch)
treeea0f03e7e3b4ed2af1e632065b4c7e8c30eb9d76 /uitest
parentd3c752e0f2abec08cd98a66495d1345ad0f56d83 (diff)
downloadvaadin-framework-40d15b32e341a38dacc24cc3ec79ab3ff0a25a50.tar.gz
vaadin-framework-40d15b32e341a38dacc24cc3ec79ab3ff0a25a50.zip
Construct array inline (#10068)
And some trivial test enhancements
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForTrees.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFields.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridRefreshRow.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java4
-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/TableToggleVisibility.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldsValueChangeMode.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeBasicFeatures.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeTableCssTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/DragAndDropUploadAndInteractions.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractFieldElementSetValueReadOnly.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/TestUtils.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridRendererChangeWidget.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/textarea/TextAreaCursorPosition.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/tree/SimpleTree.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorUnbufferedTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectCaptionGenerationTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/elements/combobox/ComboBoxInputNotAllowedTest.java2
-rwxr-xr-xuitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridDetailsLocationTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java4
76 files changed, 132 insertions, 135 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java b/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
index cbf8d676dd..9403b5a82e 100644
--- a/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
@@ -64,7 +64,7 @@ public class StressComponentsInTable extends CustomComponent {
return t;
}
- static String[] testString = new String[] { "Jacob", "Michael", "Joshua",
+ static String[] testString = { "Jacob", "Michael", "Joshua",
"Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher",
"Joseph", "William", "Alexander", "Ryan", "David", "Nicholas",
"Tyler", "James", "John", "Jonathan", "Nathan", "Samuel",
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java b/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java
index d96ef91672..b8d498ef7c 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java
@@ -37,10 +37,10 @@ import com.vaadin.v7.ui.TwinColSelect;
*/
public class TestForPreconfiguredComponents extends CustomComponent {
- private static final String[] firstnames = new String[] { "John", "Mary",
+ private static final String[] firstnames = { "John", "Mary",
"Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
- private static final String[] lastnames = new String[] { "Torvalds",
+ private static final String[] lastnames = { "Torvalds",
"Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding",
"Einstein" };
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
index 017e1b54c6..bec14f12ef 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
@@ -155,7 +155,7 @@ public class TestForTablesInitialColumnWidthLogicRendering
return t;
}
- static String[] testString = new String[] { "Jacob", "Michael", "Joshua",
+ static String[] testString = { "Jacob", "Michael", "Joshua",
"Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher",
"Joseph", "William", "Alexander", "Ryan", "David", "Nicholas",
"Tyler", "James", "John", "Jonathan", "Nathan", "Samuel",
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForTrees.java b/uitest/src/main/java/com/vaadin/tests/TestForTrees.java
index 418fd08592..c5e8376c0f 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForTrees.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForTrees.java
@@ -37,16 +37,16 @@ import com.vaadin.v7.ui.Tree;
*/
public class TestForTrees extends CustomComponent implements Handler {
- private static final String[] firstnames = new String[] { "John", "Mary",
+ private static final String[] firstnames = { "John", "Mary",
"Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
- private static final String[] lastnames = new String[] { "Torvalds",
+ private static final String[] lastnames = { "Torvalds",
"Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding",
"Einstein" };
private final VerticalLayout main = new VerticalLayout();
- private final Action[] actions = new Action[] { new Action("edit"),
+ private final Action[] actions = { new Action("edit"),
new Action("delete") };
private VerticalLayout al;
diff --git a/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java b/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java
index 50d491ae96..dccfbaa1e1 100644
--- a/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java
@@ -54,7 +54,7 @@ public class UsingCustomNewItemHandlerInSelect extends CustomComponent {
}
public void populateSelect() {
- final String[] names = new String[] { "John", "Mary", "Joe", "Sarah",
+ final String[] names = { "John", "Mary", "Joe", "Sarah",
"Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
for (int j = 0; j < 4; j++) {
Integer id = new Integer(sequence++);
diff --git a/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java b/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
index a296e3342d..76396799bb 100644
--- a/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
@@ -64,9 +64,9 @@ public class UsingObjectsInSelect extends com.vaadin.server.LegacyApplication
}
public void createExampleTasks() {
- final String[] assignedTo = new String[] { "John", "Mary", "Joe",
+ final String[] assignedTo = { "John", "Mary", "Joe",
"Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
- final String[] type = new String[] { "Enhancement", "Bugfix", "Testing",
+ final String[] type = { "Enhancement", "Bugfix", "Testing",
"Task" };
for (int j = 0; j < 100; j++) {
final Task task = new Task(
diff --git a/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java b/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java
index dac4584a63..d5fe3fe6a0 100644
--- a/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java
+++ b/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java
@@ -18,10 +18,7 @@ public class ActionsWithoutKeyCode extends AbstractTestUIWithLog {
addActionHandler(new Action.Handler() {
- private Action[] actions;
- {
- actions = new Action[] { new Action("test1") };
- }
+ private Action[] actions = { new Action("test1") };
@Override
public Action[] getActions(Object target, Object sender) {
diff --git a/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java b/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java
index dccb25c381..9ce27212e7 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java
@@ -223,7 +223,7 @@ public class Calc extends AbstractReindeerTestUI {
// The operations for the calculator in the order they appear on the
// screen (left to right, top to bottom)
- String[] operations = new String[] { "7", "8", "9", "/", "4", "5", "6",
+ String[] operations = { "7", "8", "9", "/", "4", "5", "6",
"*", "1", "2", "3", "-", "0", "=", "C", "+" };
for (String caption : operations) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
index c3a8fcbbf5..b34fcad46d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
@@ -313,7 +313,7 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
// addCommands.put("HorizontalLayout", addHorizontalLayoutCommand);
// addCommands.put("VerticalLayout", addVerticalLayoutCommand);
- ComponentSize[] sizes = new ComponentSize[] {
+ ComponentSize[] sizes = {
new ComponentSize(null, null), new ComponentSize("200px", null),
new ComponentSize("100%", null),
new ComponentSize(null, "200px"),
@@ -344,7 +344,7 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
String heightCategory = "Change component height";
createCategory(heightCategory, category);
- String[] options = new String[] { "100px", "200px", "50%", "100%" };
+ String[] options = { "100px", "200px", "50%", "100%" };
for (int i = 0; i < 20; i++) {
String componentWidthCategory = "Component " + i + " width";
String componentHeightCategory = "Component " + i + " height";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java
index 95f3138e69..bcb899c66c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java
@@ -82,7 +82,7 @@ public class DisableEnableCascade extends TestBase {
@Override
protected String getDescription() {
- return "Tests the disable state is cascaded correctly to children. Disabling a parent should disabled its children aswell. The buttons only toggle the state of the target component.";
+ return "Tests the disable state is cascaded correctly to children. Disabling a parent should disabled its children as well. The buttons only toggle the state of the target component.";
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java b/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
index 3b331a23df..44ba18cb8b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
@@ -189,7 +189,7 @@ public class TouchScrollables extends TestBase {
table.addActionHandler(new Handler() {
- Action[] actions = new Action[] { new Action("FOO"),
+ Action[] actions = { new Action("FOO"),
new Action("BAR"), new Action("CAR") };
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java b/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java
index c97e69bd68..e25ab542e6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java
@@ -16,7 +16,7 @@ public class IconsInCaption extends TestBase {
private static final String TYPE_EMBEDDED = "Embedded";
private static final String TYPE_CAPTION = "In caption";
- private static final String[] icons = new String[] { "arrow-down.png",
+ private static final String[] icons = { "arrow-down.png",
"arrow-left.png", "arrow-right.png", "arrow-up.png",
"attention.png", "calendar.png", "cancel.png", "document.png",
"document-add.png", "document-delete.png", "document-doc.png",
@@ -27,7 +27,7 @@ public class IconsInCaption extends TestBase {
"lock.png", "note.png", "ok.png", "reload.png", "settings.png",
"trash.png", "trash-full.png", "user.png", "users.png" };
- private static final String[] sizes = new String[] { "16", "32", "64" };
+ private static final String[] sizes = { "16", "32", "64" };
private ComponentContainer container = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java
index 9ea835aac5..c665537250 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java
@@ -9,7 +9,7 @@ import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class ComboBoxCombinedWithEnterShortcut extends TestBase {
- final String[] cities = new String[] { "Berlin", "Brussels", "Helsinki",
+ final String[] cities = { "Berlin", "Brussels", "Helsinki",
"Madrid", "Oslo", "Paris", "Stockholm" };
private Log log = new Log(5);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java
index c35aa2a06a..f43ba264be 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java
@@ -11,7 +11,7 @@ import com.vaadin.ui.ComboBox;
@Widgetset("com.vaadin.DefaultWidgetSet")
public class ComboBoxVaadinIcons extends AbstractTestUI {
- public static final VaadinIcons[] icons = new VaadinIcons[] {
+ public static final VaadinIcons[] icons = {
VaadinIcons.AMBULANCE, VaadinIcons.PAPERPLANE,
VaadinIcons.AIRPLANE };
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFields.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFields.java
index ac11263bfc..daae32327a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFields.java
@@ -13,7 +13,7 @@ import com.vaadin.ui.DateField;
@SuppressWarnings("serial")
public class DateFields extends ComponentTestCase<DateField> {
- private static final Locale[] LOCALES = new Locale[] { Locale.US,
+ private static final Locale[] LOCALES = { Locale.US,
Locale.TAIWAN, new Locale("fi", "FI") };
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java
index a49edc1e69..02da061d08 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java
@@ -13,7 +13,7 @@ import com.vaadin.ui.InlineDateField;
@SuppressWarnings("serial")
public class InlineDateFields extends ComponentTestCase<InlineDateField> {
- private static final Locale[] LOCALES = new Locale[] { Locale.US,
+ private static final Locale[] LOCALES = { Locale.US,
Locale.TAIWAN, new Locale("fi", "FI") };
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRefreshRow.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRefreshRow.java
index a22fc6aaea..05e82b7192 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRefreshRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRefreshRow.java
@@ -23,7 +23,7 @@ public class GridRefreshRow extends AbstractTestUIWithLog {
private PersonContainer container;
private Grid grid;
- private boolean styles[] = new boolean[] { false, false, false };
+ private boolean styles[] = { false, false, false };
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
index 3d8b29a4c9..8ffe3abadd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
@@ -245,26 +245,26 @@ public class VaadinTunesLayout extends AbstractReindeerTestUI {
new NativeSelect());
// Lets populate the table with random data
- String[] tracks = new String[] { "Red Flag", "Millstone", "Not The Sun",
+ String[] tracks = { "Red Flag", "Millstone", "Not The Sun",
"Breath", "Here We Are", "Deep Heaven", "Her Voice Resides",
"Natural Tan", "End It All", "Kings", "Daylight Slaving",
"Mad Man", "Resolve", "Teargas", "African Air",
"Passing Bird" };
- String[] times = new String[] { "4:12", "6:03", "5:43", "4:32", "3:42",
+ String[] times = { "4:12", "6:03", "5:43", "4:32", "3:42",
"4:45", "2:56", "9:34", "2:10", "3:44", "5:49", "6:30", "5:18",
"7:42", "3:13", "2:52" };
- String[] artists = new String[] { "Billy Talent", "Brand New",
+ String[] artists = { "Billy Talent", "Brand New",
"Breaking Benjamin", "Becoming The Archetype",
"Bullet For My Valentine", "Chasing Victory", "Chimaira",
"Danko Jones", "Deadlock", "Deftones", "From Autumn To Ashes",
"Haste The Day", "Four Year Strong", "In Flames", "Kemopetrol",
"John Legend" };
- String[] albums = new String[] { "Once Again", "The Caitiff Choir",
+ String[] albums = { "Once Again", "The Caitiff Choir",
"The Devil And God", "Light Grenades", "Dicthonomy",
"Back In Black", "Dreamer", "Come Clarity", "Year Zero",
"Frames", "Fortress", "Phobia", "The Poison", "Manifesto",
"White Pony", "The Big Dirty" };
- String[] genres = new String[] { "Rock", "Metal", "Hardcore", "Indie",
+ String[] genres = { "Rock", "Metal", "Hardcore", "Indie",
"Pop", "Alternative", "Blues", "Jazz", "Hip Hop", "Electronica",
"Punk", "Hard Rock", "Dance", "R'n'B", "Gospel", "Country" };
for (int i = 0; i < 1000; i++) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
index 863fb5aea7..428b125a8b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
@@ -19,7 +19,7 @@ public class RichTextAreaWithKeyboardShortcuts extends TestBase {
private Handler actionHandler = new Handler() {
ShortcutAction save = new ShortcutAction("^Save");
- private Action[] actions = new Action[] { save };
+ private Action[] actions = { save };
@Override
public void handleAction(Action action, Object sender, Object target) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java
index 5d9e72ea24..e784f9b125 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java
@@ -30,7 +30,7 @@ public class ColumnCollapsingAndColumnExpansion
table.addActionHandler(new Handler() {
final Action H = new Action("Toggle Col2");
- final Action[] actions = new Action[] { H };
+ final Action[] actions = { H };
@Override
public Action[] getActions(Object target, Object sender) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
index d965f654d4..936289223d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
@@ -53,8 +53,8 @@ public class HiddenColumnsExpandRatios extends TestBase {
private String genValue() {
Random rnd = new Random();
- StringBuffer str = new StringBuffer("");
- String[] strings = new String[] { "foo", "bar", "baz" };
+ StringBuffer str = new StringBuffer();
+ String[] strings = { "foo", "bar", "baz" };
for (int i = 0; i < 5; i++) {
str.append(strings[Math.abs(rnd.nextInt() % strings.length)])
.append(" ");
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 5732f79b95..4c3dba7ee0 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
@@ -27,7 +27,7 @@ public class SetDataSourceWithPropertyIds extends AbstractReindeerTestUI {
}
private static final String TABLE_NAME = "JOBS";
- private static final String[] PK_COLUMN_NAMES = new String[] { "JOB_ID" };
+ private static final String[] PK_COLUMN_NAMES = { "JOB_ID" };
private static final String SEQUENCE_NAME = "";
private static final String VERSION_COLUMN_NAME = "";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
index 0410b23996..dd88b6cf72 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
@@ -13,7 +13,7 @@ import com.vaadin.v7.ui.Table;
public class TableToggleVisibility extends AbstractTestCase {
- private static final int[] LENGTHS = new int[] { 20, 22, 10 };
+ private static final int[] LENGTHS = { 20, 22, 10 };
@Override
public void init() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.java
index 00a5f2311a..d0d032bf57 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdate.java
@@ -9,8 +9,8 @@ import com.vaadin.v7.ui.Table;
public class TableVisibleColumnsUpdate extends AbstractReindeerTestUI {
- private String[] cols1 = new String[] { "p1", "p2", "p3" };
- private String[] cols2 = new String[] { "p1", "p4", "p3" };
+ private String[] cols1 = { "p1", "p2", "p3" };
+ private String[] cols2 = { "p1", "p4", "p3" };
private Table table;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
index 3910b3a4f1..6fa8511b0a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
@@ -158,7 +158,7 @@ public class TabSheetTest<T extends TabSheet> extends
createCategory(captionCategory, category);
createCategory(iconCategory, category);
- String captionOptions[] = new String[] { "", "{id}", "Tab {id}",
+ String captionOptions[] = { "", "{id}", "Tab {id}",
"A long caption for tab {id}" };
LinkedHashMap<String, Resource> iconOptions = new LinkedHashMap<>();
iconOptions.put("-", null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java
index c8945e0e38..815ebc5197 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java
@@ -69,7 +69,7 @@ public class TextChangeEvents extends AbstractTestUIWithLog {
*/
private class VaadinDeveloperNameField extends TextField
implements HasValue.ValueChangeListener<String> {
- private String[] names = new String[] { "Matti Tahvonen",
+ private String[] names = { "Matti Tahvonen",
"Marc Englund", "Joonas Lehtinen", "Jouni Koivuviita",
"Marko Grönroos", "Artur Signell" };
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldsValueChangeMode.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldsValueChangeMode.java
index cef3749a50..5c98476630 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldsValueChangeMode.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldsValueChangeMode.java
@@ -100,7 +100,7 @@ public class TextFieldsValueChangeMode extends AbstractTestUIWithLog {
*
*/
private class VaadinDeveloperNameField extends TextField {
- private String[] names = new String[] { "Matti Tahvonen",
+ private String[] names = { "Matti Tahvonen",
"Marc Englund", "Joonas Lehtinen", "Jouni Koivuviita",
"Marko Grönroos", "Artur Signell" };
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeBasicFeatures.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeBasicFeatures.java
index b18364ccb8..8796e724be 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeBasicFeatures.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeBasicFeatures.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.VerticalLayout;
@Widgetset("com.vaadin.DefaultWidgetSet")
public class TreeBasicFeatures extends AbstractTestUIWithLog {
- public static final double[] ROW_HEIGHTS = new double[] { 35.5d, 72.78d };
+ public static final double[] ROW_HEIGHTS = { 35.5d, 72.78d };
private Tree<HierarchicalTestBean> tree;
private TreeDataProvider<HierarchicalTestBean> inMemoryDataProvider;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java
index 4771df9f3a..2ccb8a821a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java
@@ -19,9 +19,9 @@ public class TablesCssTest extends GridLayout {
private final Action ACTION_MARK = new Action("Mark");
private final Action ACTION_UNMARK = new Action("Unmark");
private final Action ACTION_LOG = new Action("Save");
- private final Action[] ACTIONS_UNMARKED = new Action[] { ACTION_MARK,
+ private final Action[] ACTIONS_UNMARKED = { ACTION_MARK,
ACTION_LOG };
- private final Action[] ACTIONS_MARKED = new Action[] { ACTION_UNMARK,
+ private final Action[] ACTIONS_MARKED = { ACTION_UNMARK,
ACTION_LOG };
public TablesCssTest(TestSampler parent) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java
index 2043faa760..25f475018b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java
@@ -13,7 +13,7 @@ public class TreeCssTest {
// Actions for the context menu
final Action ACTION_ADD = new Action("Add child item");
final Action ACTION_DELETE = new Action("Delete");
- final Action[] ACTIONS = new Action[] { ACTION_ADD, ACTION_DELETE };
+ final Action[] ACTIONS = { ACTION_ADD, ACTION_DELETE };
final Tree tree = new Tree();
tree.setId("tree" + debugIdCounter++);
@@ -48,7 +48,7 @@ public class TreeCssTest {
}
private HierarchicalContainer createHierarchicalContainer() {
- String[] itemNames = new String[] { "Foo", "Baar" };
+ String[] itemNames = { "Foo", "Baar" };
HierarchicalContainer hc = new HierarchicalContainer();
hc.addContainerProperty("NAME", String.class, null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeTableCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeTableCssTest.java
index 23ef7d5a6d..097fa979e0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeTableCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeTableCssTest.java
@@ -24,7 +24,7 @@ public class TreeTableCssTest {
}
private HierarchicalContainer createHierarchicalContainer() {
- String[] itemNames = new String[] { "Foo", "Baar" };
+ String[] itemNames = { "Foo", "Baar" };
HierarchicalContainer hc = new HierarchicalContainer();
hc.addContainerProperty("NAME", String.class, null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/DragAndDropUploadAndInteractions.java b/uitest/src/main/java/com/vaadin/tests/components/upload/DragAndDropUploadAndInteractions.java
index 683d9b7deb..b1843169a2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/DragAndDropUploadAndInteractions.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/DragAndDropUploadAndInteractions.java
@@ -141,7 +141,7 @@ public class DragAndDropUploadAndInteractions extends AbstractTestUIWithLog {
protected String formatSize(double contentLength) {
double d = contentLength;
int suffix = 0;
- String[] suffixes = new String[] { "B", "KB", "MB", "GB", "TB" };
+ String[] suffixes = { "B", "KB", "MB", "GB", "TB" };
while (d > 1024) {
suffix++;
d /= 1024.0;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
index 6b621653d5..9510348c31 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
@@ -55,7 +55,7 @@ public class SubWindowFocusAndBlurListeners extends TestBase {
window.addActionHandler(new Handler() {
- private Action[] s = new Action[] { new ShortcutAction("^Save") };
+ private Action[] s = { new ShortcutAction("^Save") };
@Override
public Action[] getActions(Object target, Object sender) {
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java b/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java
index ecec34905e..4af48db20a 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java
@@ -54,7 +54,7 @@ public class TestItemSorter extends TestBase {
private static void populateContainer(IndexedContainer container) {
container.removeAllItems();
- String[] strings = new String[] { "Text 1", "Text 2", "true", "false",
+ String[] strings = { "Text 1", "Text 2", "true", "false",
"Caption 1", "Caption 2" };
for (String s : strings) {
Object id = container.addItem();
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 e132712e9e..9087b80944 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
@@ -53,7 +53,7 @@ public class DDTest6 extends TestBase {
java.util.Random r = new java.util.Random(1);
- File[] files = new File[] { new Folder("Docs"), new Folder("Music"),
+ File[] files = { new Folder("Docs"), new Folder("Music"),
new Folder("Images"), new File("document.doc"),
new File("song.mp3"), new File("photo.jpg") };
@@ -130,7 +130,7 @@ public class DDTest6 extends TestBase {
Handler actionHandler = new Handler() {
- private Action[] actions = new Action[] { new Action("Remove") };
+ private Action[] actions = { new Action("Remove") };
@Override
public void handleAction(Action action, Object sender,
@@ -515,7 +515,7 @@ public class DDTest6 extends TestBase {
}
- String[] knownTypes = new String[] { "image/png", "text/csv" };
+ String[] knownTypes = { "image/png", "text/csv" };
private boolean canDisplay(String type) {
if (type != null) {
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 3c4e56e933..92f18ceffe 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
@@ -241,7 +241,7 @@ public class TreeDragStart extends TestBase {
HashMap<String, InventoryObject> inventoryStore = new HashMap<>();
public HierarchicalContainer createTreeContent() {
- final Object[] inventory = new Object[] {
+ 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),
diff --git a/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java b/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java
index 819548cff8..0b4a110ef7 100644
--- a/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java
@@ -94,9 +94,9 @@ public class ComponentElementGetValue extends AbstractTestUI {
private void addMultiSelectComponents() {
List<MultiSelect<String>> components = new ArrayList<>();
- components.add(new ListSelect("", createData()));
- components.add(new CheckBoxGroup("", createData()));
- components.add(new TwinColSelect("", createData()));
+ components.add(new ListSelect<>("", createData()));
+ components.add(new CheckBoxGroup<>("", createData()));
+ components.add(new TwinColSelect<>("", createData()));
components.forEach(c -> {
c.select(TEST_STRING_VALUE);
c.addValueChangeListener(event -> {
diff --git a/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractFieldElementSetValueReadOnly.java b/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractFieldElementSetValueReadOnly.java
index 01f9eedda9..ebd26a4a53 100644
--- a/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractFieldElementSetValueReadOnly.java
+++ b/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractFieldElementSetValueReadOnly.java
@@ -24,22 +24,22 @@ public class AbstractFieldElementSetValueReadOnly extends AbstractTestUI {
private AbstractField<?>[] fields = { new TextArea(), new TextField(),
new DateField(), new PasswordField(), new CheckBox(),
new RichTextArea(), new Slider() };
- private AbstractMultiSelect<?>[] multiSelects = { new ListSelect(),
- new CheckBoxGroup(), new TwinColSelect() };
- private AbstractSingleSelect<?>[] singleSelects = { new ComboBox(),
- new NativeSelect(), new RadioButtonGroup() };
+ private AbstractMultiSelect<?>[] multiSelects = { new ListSelect<Object>(),
+ new CheckBoxGroup<Object>(), new TwinColSelect<Object>() };
+ private AbstractSingleSelect<?>[] singleSelects = { new ComboBox<Object>(),
+ new NativeSelect<Object>(), new RadioButtonGroup<Object>() };
@Override
protected void setup(VaadinRequest request) {
- for (AbstractField field : fields) {
+ for (AbstractField<?> field : fields) {
field.setReadOnly(true);
addComponent(field);
}
- for (AbstractMultiSelect multiSelect : multiSelects) {
+ for (AbstractMultiSelect<?> multiSelect : multiSelects) {
multiSelect.setReadOnly(true);
addComponent(multiSelect);
}
- for (AbstractSingleSelect singleSelect : singleSelects) {
+ for (AbstractSingleSelect<?> singleSelect : singleSelects) {
singleSelect.setReadOnly(true);
addComponent(singleSelect);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java
index 39d7f0d5a5..c8f761e237 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java
@@ -50,7 +50,7 @@ import com.vaadin.v7.ui.TextField;
public abstract class AbstractBasicCrud extends AbstractTestUIWithLog {
protected AbstractForm form;
- protected static String[] columns = new String[] { "firstName", "lastName",
+ protected static String[] columns = { "firstName", "lastName",
"gender", "birthDate", "age", "alive", "address.streetAddress",
"address.postalCode", "address.city", "address.country" };
protected BeanItemContainer<ComplexPerson> container = ComplexPerson
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java
index 9795973e93..1b2ec56599 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java
@@ -9,14 +9,14 @@ import com.vaadin.ui.Notification;
import com.vaadin.v7.data.fieldgroup.BeanFieldGroup;
import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException;
-public abstract class AbstractBeanFieldGroupTest extends TestBase {
+public abstract class AbstractBeanFieldGroupTest<T> extends TestBase {
private Button commitButton;
protected Log log = new Log(5);
private Button discardButton;
private Button showBeanButton;
- private BeanFieldGroup fieldBinder;
+ private BeanFieldGroup<T> fieldBinder;
@Override
protected void setup() {
@@ -76,11 +76,11 @@ public abstract class AbstractBeanFieldGroupTest extends TestBase {
return commitButton;
}
- protected BeanFieldGroup getFieldBinder() {
+ protected BeanFieldGroup<T> getFieldBinder() {
return fieldBinder;
}
- protected void setFieldBinder(BeanFieldGroup beanFieldBinder) {
+ protected void setFieldBinder(BeanFieldGroup<T> beanFieldBinder) {
fieldBinder = beanFieldBinder;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
index 8605c76f46..dfbb7c33f8 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
@@ -11,7 +11,7 @@ import com.vaadin.v7.data.fieldgroup.BeanFieldGroup;
import com.vaadin.v7.ui.NativeSelect;
import com.vaadin.v7.ui.TextField;
-public class FormWithNestedProperties extends AbstractBeanFieldGroupTest {
+public class FormWithNestedProperties extends AbstractBeanFieldGroupTest<Person> {
private Log log = new Log(5);
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java b/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
index 112965d06a..7a51c201d6 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
@@ -24,7 +24,7 @@ import com.vaadin.v7.ui.ListSelect;
public class OrderedLayoutBasics extends TestBase {
- String valignName[] = new String[] { "top", "middle", "bottom" };
+ String valignName[] = { "top", "middle", "bottom" };
Set<AbstractOrderedLayout> layouts = new HashSet<>();
private AbstractOrderedLayout layoutContainer;
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
index b15a7c004a..76d3e921d7 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
@@ -45,16 +45,16 @@ public abstract class BaseLayoutTestUI extends AbstractReindeerTestUI {
protected static final String CALENDAR_32_PNG = "../runo/icons/16/calendar.png";
protected static final String LOCK_16_PNG = "../runo/icons/16/lock.png";
protected static final String GLOBE_16_PNG = "../runo/icons/16/globe.png";
- public Alignment[] alignments = new Alignment[] { Alignment.TOP_CENTER,
+ public Alignment[] alignments = { Alignment.TOP_CENTER,
Alignment.TOP_LEFT, Alignment.TOP_RIGHT, Alignment.BOTTOM_CENTER,
Alignment.BOTTOM_LEFT, Alignment.BOTTOM_RIGHT,
Alignment.MIDDLE_CENTER, Alignment.MIDDLE_LEFT,
Alignment.MIDDLE_RIGHT };
- public final String[] CAPTIONS = new String[] { "",
+ public final String[] CAPTIONS = { "",
"VeryLongOneWordCaption",
"Very long caption of 50 approximately symbols aaaaaaaaaaaa aaaaaa aaa " };
- Resource[] ICONS = new Resource[] { new ThemeResource(CALENDAR_32_PNG),
+ Resource[] ICONS = { new ThemeResource(CALENDAR_32_PNG),
new ThemeResource(LOCK_16_PNG), new ThemeResource(GLOBE_16_PNG) };
public AbstractComponent[] components = new AbstractComponent[alignments.length];
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java b/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
index 155e24b561..92f073aad4 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
@@ -56,7 +56,8 @@ public class PushErrorHandling extends AbstractReindeerTestUI {
@Override
public void itemClick(ItemClickEvent event) {
- BeanContainer<String, AbstractInMemoryContainer> metaContainer = new BeanContainer<String, AbstractInMemoryContainer>(
+ BeanContainer<String, AbstractInMemoryContainer<?, ?, ?>> metaContainer
+ = new BeanContainer<String, AbstractInMemoryContainer<?, ?, ?>>(
AbstractInMemoryContainer.class) {
@Override
public Collection<String> getContainerPropertyIds() {
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java b/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java
index 40e5192c87..c73f104e8d 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java
@@ -85,7 +85,7 @@ public class ResourceDownload extends TestBase {
@Override
protected String getDescription() {
- return "Downloading with target _new should work, aswell as with target _blank and _top.";
+ return "Downloading with target _new should work, as well as with target _blank and _top.";
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java b/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java
index 81c5a07261..1e7b310c53 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java
@@ -112,7 +112,7 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication {
private Layout buildButtons(boolean disabled, boolean icon, boolean error,
boolean sized) {
- String[] buttonStyles = new String[] { "Normal", "Primary", "Small",
+ String[] buttonStyles = { "Normal", "Primary", "Small",
"Link" };
HorizontalLayout hl = new HorizontalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java
index 8982a01a4e..fd5b00e6a2 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java
@@ -18,7 +18,7 @@ package com.vaadin.tests.themes.valo;
import com.vaadin.shared.util.SharedUtil;
public class StringGenerator {
- static String[] strings = new String[] { "lorem", "ipsum", "dolor", "sit",
+ static String[] strings = { "lorem", "ipsum", "dolor", "sit",
"amet", "consectetur", "quid", "securi", "etiam", "tamquam", "eu",
"fugiat", "nulla", "pariatur" };
int stringCount = -1;
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
index c45b99df37..4f9046b485 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
@@ -372,7 +372,7 @@ public class ValoThemeUI extends UI {
private final Action ACTION_ONE = new Action("Action One");
private final Action ACTION_TWO = new Action("Action Two");
private final Action ACTION_THREE = new Action("Action Three");
- private final Action[] ACTIONS = new Action[] { ACTION_ONE, ACTION_TWO,
+ private final Action[] ACTIONS = { ACTION_ONE, ACTION_TWO,
ACTION_THREE };
@Override
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 caedc9f299..a94e53a924 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
@@ -14,7 +14,7 @@ public class PersonContainer extends BeanItemContainer<Person>
/**
* Natural property order for Person bean. Used in tables and forms.
*/
- public static final Object[] NATURAL_COL_ORDER = new Object[] { "firstName",
+ public static final Object[] NATURAL_COL_ORDER = { "firstName",
"lastName", "email", "phoneNumber", "address.streetAddress",
"address.postalCode", "address.city" };
@@ -22,7 +22,7 @@ public class PersonContainer extends BeanItemContainer<Person>
* "Human readable" captions for properties in same order as in
* NATURAL_COL_ORDER.
*/
- public static final String[] COL_HEADERS_ENGLISH = new String[] {
+ public static final String[] COL_HEADERS_ENGLISH = {
"First name", "Last name", "Email", "Phone number",
"Street Address", "Postal Code", "City" };
diff --git a/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java b/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java
index 69589cec9e..650e01a168 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java
@@ -11,7 +11,7 @@ public class TestUtils {
public static final Object iso3166_PROPERTY_NAME = "name";
public static final Object iso3166_PROPERTY_SHORT = "short";
- private static final String[] iso3166 = new String[] { "AFGHANISTAN", "AF",
+ private static final String[] iso3166 = { "AFGHANISTAN", "AF",
"ÅLAND ISLANDS", "AX", "ALBANIA", "AL", "ALGERIA", "DZ",
"AMERICAN SAMOA", "AS", "ANDORRA", "AD", "ANGOLA", "AO", "ANGUILLA",
"AI", "ANTARCTICA", "AQ", "ANTIGUA AND BARBUDA", "AG", "ARGENTINA",
diff --git a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
index 31718c6432..b971f1cc94 100644
--- a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
+++ b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
@@ -89,7 +89,7 @@ public class FieldErrorIndication extends AbstractReindeerTestUI {
PasswordField.class };
vl = new VerticalLayout();
hl.addComponent(vl);
- for (Class<? extends Field> fieldClass : textFields) {
+ for (Class<? extends AbstractField> fieldClass : textFields) {
vl.addComponent(getField(fieldClass));
}
@@ -100,10 +100,9 @@ public class FieldErrorIndication extends AbstractReindeerTestUI {
* @param fieldClass
* @return
*/
- private Component getField(Class<? extends Field> fieldClass) {
- AbstractField f;
+ private Component getField(Class<? extends AbstractField> fieldClass) {
try {
- f = (AbstractField) fieldClass.newInstance();
+ AbstractField<?> f = fieldClass.newInstance();
f.setCaption(fieldClass.getSimpleName());
f.setComponentError(new UserError("fail"));
return f;
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java
index 23ff82cb10..77f9a18dd4 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java
@@ -434,7 +434,7 @@ public class EscalatorBasicClientFeaturesWidget
}
private void createSizeMenu() {
- String[] menupath = new String[] { "General", "Size" };
+ String[] menupath = { "General", "Size" };
addSizeMenuItem(null, "height", menupath);
addSizeMenuItem("200px", "height", menupath);
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 e70c7c87f6..806c639998 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
@@ -821,7 +821,7 @@ public class GridBasicClientFeaturesWidget
}
private void createScrollToRowMenu() {
- String[] menupath = new String[] { "Component", "State", "Scroll to...",
+ String[] menupath = { "Component", "State", "Scroll to...",
null };
for (int i = 0; i < ROWS; i += 100) {
@@ -1450,7 +1450,7 @@ public class GridBasicClientFeaturesWidget
}
private void createDetailsMenu() {
- String[] menupath = new String[] { "Component", "Row details" };
+ String[] menupath = { "Component", "Row details" };
addMenuCommand("Set generator", new ScheduledCommand() {
@Override
public void execute() {
@@ -1509,7 +1509,7 @@ public class GridBasicClientFeaturesWidget
}
}, menupath);
- String[] togglemenupath = new String[] { menupath[0], menupath[1],
+ String[] togglemenupath = { menupath[0], menupath[1],
"Toggle details for..." };
for (int i : new int[] { 0, 1, 100, 200, 300, 400, 500, 600, 700, 800,
900, 999 }) {
@@ -1532,7 +1532,7 @@ public class GridBasicClientFeaturesWidget
}
private void createSidebarMenu() {
- String[] menupath = new String[] { "Component", "Sidebar" };
+ String[] menupath = { "Component", "Sidebar" };
final List<MenuItem> customMenuItems = new ArrayList<>();
final List<MenuItemSeparator> separators = new ArrayList<>();
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridRendererChangeWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridRendererChangeWidget.java
index 854a08202c..45ef510a05 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridRendererChangeWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridRendererChangeWidget.java
@@ -94,7 +94,7 @@ public class GridRendererChangeWidget
public GridRendererChangeWidget() {
super(new Grid<String[]>());
- String[] strArr = new String[] { "foo", "bar" };
+ String[] strArr = { "foo", "bar" };
ListDataSource<String[]> ds = new ListDataSource<String[]>(strArr);
final Grid<String[]> grid = getTestedWidget();
grid.setDataSource(ds);
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeUI.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeUI.java
index e03339467b..815b48eda1 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeUI.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeUI.java
@@ -40,7 +40,7 @@ public class GridThemeUI extends AbstractTestUIWithLog {
private Grid grid;
- protected static String[] columns = new String[] { "firstName", "lastName",
+ protected static String[] columns = { "firstName", "lastName",
"gender", "birthDate", "age", "alive", "address.streetAddress",
"address.postalCode", "address.city", "address.country" };
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/textarea/TextAreaCursorPosition.java b/uitest/src/main/java/com/vaadin/v7/tests/components/textarea/TextAreaCursorPosition.java
index f5f0b6890b..7834bf96ee 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/textarea/TextAreaCursorPosition.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/textarea/TextAreaCursorPosition.java
@@ -26,7 +26,7 @@ public class TextAreaCursorPosition extends TestBase {
addComponent(new Button("Force position update"));
}
- public void addListener(AbstractField newField) {
+ public void addListener(AbstractField<?> newField) {
AbstractTextField newTextField = (AbstractTextField) newField;
newTextField.setValueChangeMode(ValueChangeMode.EAGER);
newTextField.addValueChangeListener(event -> {
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents.java b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents.java
index 406309f471..207d62d157 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents.java
@@ -81,7 +81,7 @@ public class TextChangeEvents extends TestBase {
*/
private class VaadinDeveloperNameField extends TextField
implements TextChangeListener {
- private String[] names = new String[] { "Matti Tahvonen",
+ private String[] names = { "Matti Tahvonen",
"Marc Englund", "Joonas Lehtinen", "Jouni Koivuviita",
"Marko Grönroos", "Artur Signell" };
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java
index 4cface820c..4dd7dfd527 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java
@@ -122,7 +122,7 @@ public class TextChangeEvents2 extends TestBase {
}
{
- final TextField[] tfs = new TextField[] { new TextField(),
+ final TextField[] tfs = { new TextField(),
new TextField(), new TextField(), new TextField() };
HorizontalLayout hl = new HorizontalLayout();
hl.setCaption("Blää");
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/tree/SimpleTree.java b/uitest/src/main/java/com/vaadin/v7/tests/components/tree/SimpleTree.java
index 49b790e85a..934c25f330 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/tree/SimpleTree.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/tree/SimpleTree.java
@@ -28,7 +28,7 @@ public class SimpleTree extends TestBase implements Action.Handler {
// Actions for the context menu
private static final Action ACTION_ADD = new Action("Add child item");
private static final Action ACTION_DELETE = new Action("Delete");
- private static final Action[] ACTIONS = new Action[] { ACTION_ADD,
+ private static final Action[] ACTIONS = { ACTION_ADD,
ACTION_DELETE };
private Tree tree;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java
index c26e51e89c..8300099181 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java
@@ -42,7 +42,7 @@ public class ComboBoxIdenticalItemsTest extends MultiBrowserTest {
combobox.sendKeys(delay, Keys.ARROW_DOWN, getReturn());
waitUntilLogText("1. Item one-1 selected");
- Keys[] downDownEnter = new Keys[] { Keys.ARROW_DOWN, Keys.ARROW_DOWN,
+ Keys[] downDownEnter = { Keys.ARROW_DOWN, Keys.ARROW_DOWN,
getReturn() };
combobox.sendKeys(delay, downDownEnter);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java
index e54fe8b0d3..530d7ddda5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java
@@ -64,7 +64,7 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
public static Collection<Param> parameters() {
List<Param> data = new ArrayList<>();
- int[] params = new int[] { 0, 500, 999 };
+ int[] params = { 0, 500, 999 };
for (int rowIndex : params) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java
index 449a952872..0277657aa2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java
@@ -517,7 +517,7 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
return getTranslateValues(transform);
}
- double[] result = new double[] { -1, -1 };
+ double[] result = { -1, -1 };
String left = getLeftFromStyle(style);
if (left != null) {
result[0] = getPixelValue(left);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java
index c1f28e27cf..32b7cf4b92 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java
@@ -23,19 +23,19 @@ public class GridBasicDetailsTest extends GridBasicsTest {
* awkward with two scroll commands back to back.
*/
private static final int ALMOST_LAST_INDEX = 995;
- private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = {
"Component", "Details", "Open " + ALMOST_LAST_INDEX };
- private static final String[] OPEN_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_FIRST_ITEM_DETAILS = {
"Component", "Details", "Open First" };
- private static final String[] TOGGLE_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] TOGGLE_FIRST_ITEM_DETAILS = {
"Component", "Details", "Toggle First" };
- private static final String[] DETAILS_GENERATOR_NULL = new String[] {
+ private static final String[] DETAILS_GENERATOR_NULL = {
"Component", "Details", "Generators", "NULL" };
- private static final String[] DETAILS_GENERATOR_WATCHING = new String[] {
+ private static final String[] DETAILS_GENERATOR_WATCHING = {
"Component", "Details", "Generators", "\"Watching\"" };
- private static final String[] DETAILS_GENERATOR_PERSISTING = new String[] {
+ private static final String[] DETAILS_GENERATOR_PERSISTING = {
"Component", "Details", "Generators", "Persisting" };
- private static final String[] CHANGE_HIERARCHY = new String[] { "Component",
+ private static final String[] CHANGE_HIERARCHY = { "Component",
"Details", "Generators", "- Change Component" };
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java
index bd8d0d1ea9..d8a49a5938 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java
@@ -37,7 +37,7 @@ public abstract class GridEditorTest extends GridBasicsTest {
.className("v-grid-editor-cancel");
protected static final org.openqa.selenium.By BY_EDITOR_SAVE = By
.className("v-grid-editor-save");
- protected static final String[] TOGGLE_EDIT_ENABLED = new String[] {
+ protected static final String[] TOGGLE_EDIT_ENABLED = {
"Component", "Editor", "Enabled" };
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorUnbufferedTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorUnbufferedTest.java
index 1d32e91d43..9eacb3832e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorUnbufferedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorUnbufferedTest.java
@@ -32,9 +32,9 @@ import com.vaadin.testbench.elements.GridElement.GridCellElement;
public class GridEditorUnbufferedTest extends GridEditorTest {
- private static final String[] TOGGLE_EDITOR_BUFFERED = new String[] {
+ private static final String[] TOGGLE_EDITOR_BUFFERED = {
"Component", "Editor", "Buffered mode" };
- private static final String[] CANCEL_EDIT = new String[] { "Component",
+ private static final String[] CANCEL_EDIT = { "Component",
"Editor", "Cancel edit" };
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectCaptionGenerationTest.java b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectCaptionGenerationTest.java
index 8eecbc4563..2e7accac48 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectCaptionGenerationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectCaptionGenerationTest.java
@@ -12,7 +12,7 @@ import com.vaadin.tests.tb3.SingleBrowserTest;
public class NativeSelectCaptionGenerationTest extends SingleBrowserTest {
- private static final String[] value = new String[] { "Foo", "Bar", "Baz",
+ private static final String[] value = { "Foo", "Bar", "Baz",
"Spam", "Eggs" };
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/elements/combobox/ComboBoxInputNotAllowedTest.java b/uitest/src/test/java/com/vaadin/tests/elements/combobox/ComboBoxInputNotAllowedTest.java
index 7aae9441af..b2e4ee0151 100644
--- a/uitest/src/test/java/com/vaadin/tests/elements/combobox/ComboBoxInputNotAllowedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/elements/combobox/ComboBoxInputNotAllowedTest.java
@@ -23,7 +23,7 @@ public class ComboBoxInputNotAllowedTest extends MultiBrowserTest {
openTestURL();
ComboBoxElement cb = $(ComboBoxElement.class).first();
- String[] optionsToTest = new String[] {
+ String[] optionsToTest = {
ComboBoxInputNotAllowed.ITEM_ON_FIRST_PAGE,
ComboBoxInputNotAllowed.ITEM_ON_SECOND_PAGE,
ComboBoxInputNotAllowed.ITEM_ON_LAST_PAGE,
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
index 51f281f6de..4098a28af9 100755
--- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
@@ -33,7 +33,7 @@ public abstract class MultiBrowserTestWithProxy extends MultiBrowserTest {
private Integer proxyPort = null;
private JSch jsch;
private static String sshDir = System.getProperty("user.home") + "/.ssh/";
- private String[] publicKeys = new String[] {
+ private String[] publicKeys = {
System.getProperty("sshkey.file"), sshDir + "id_rsa",
sshDir + "id_dsa", sshDir + "id_rsa2" };
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java
index e28db240e2..c7fa0e15aa 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java
@@ -17,7 +17,7 @@ public class MenuBarTooltipTest extends MultiBrowserTest {
@Test
public void toolTipShouldBeOnTopOfMenuItem() {
- String[] themes = new String[] { ValoTheme.THEME_NAME,
+ String[] themes = { ValoTheme.THEME_NAME,
Reindeer.THEME_NAME, Runo.THEME_NAME,
ChameleonTheme.THEME_NAME };
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridDetailsLocationTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridDetailsLocationTest.java
index 3f97a248eb..947539855f 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridDetailsLocationTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridDetailsLocationTest.java
@@ -80,7 +80,7 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
public static Collection<Param> parameters() {
List<Param> data = new ArrayList<>();
- int[] params = new int[] { 0, 500, 999 };
+ int[] params = { 0, 500, 999 };
for (int rowIndex : params) {
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java
index d96fd18567..e97fea8ddf 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java
@@ -40,11 +40,11 @@ import com.vaadin.v7.tests.components.grid.basicfeatures.GridBasicClientFeatures
public class GridDetailsClientTest extends GridBasicClientFeaturesTest {
- private static final String[] SET_GENERATOR = new String[] { "Component",
+ private static final String[] SET_GENERATOR = { "Component",
"Row details", "Set generator" };
- private static final String[] SET_FAULTY_GENERATOR = new String[] {
+ private static final String[] SET_FAULTY_GENERATOR = {
"Component", "Row details", "Set faulty generator" };
- private static final String[] SET_EMPTY_GENERATOR = new String[] {
+ private static final String[] SET_EMPTY_GENERATOR = {
"Component", "Row details", "Set empty generator" };
@Before
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
index aaa2bd66f9..8313aaf0c5 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
@@ -41,9 +41,9 @@ import com.vaadin.v7.tests.components.grid.basicfeatures.GridBasicFeatures;
public class GridEditorClientTest extends GridBasicClientFeaturesTest {
- private static final String[] EDIT_ROW_100 = new String[] { "Component",
+ private static final String[] EDIT_ROW_100 = { "Component",
"Editor", "Edit row 100" };
- private static final String[] EDIT_ROW_5 = new String[] { "Component",
+ private static final String[] EDIT_ROW_5 = { "Component",
"Editor", "Edit row 5" };
@Before
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java
index b63da5ce30..f02c88f0e8 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java
@@ -32,9 +32,9 @@ import com.vaadin.v7.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
@TestCategory("grid")
public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
- private static final String[] TOGGLE_LISTENER = new String[] { "Component",
+ private static final String[] TOGGLE_LISTENER = { "Component",
"State", "ColumnVisibilityChangeListener" };
- private static final String[] TOGGLE_HIDE_COLUMN_0 = new String[] {
+ private static final String[] TOGGLE_HIDE_COLUMN_0 = {
"Component", "Columns", "Column 0", "Hidden" };
private static final String COLUMN_0_BECAME_HIDDEN_MSG = "Visibility "
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java
index d1225a8b1b..282a28df85 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java
@@ -38,19 +38,19 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
* awkward with two scroll commands back to back.
*/
private static final int ALMOST_LAST_INDEX = 995;
- private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = {
"Component", "Details", "Open " + ALMOST_LAST_INDEX };
- private static final String[] OPEN_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_FIRST_ITEM_DETAILS = {
"Component", "Details", "Open firstItemId" };
- private static final String[] TOGGLE_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] TOGGLE_FIRST_ITEM_DETAILS = {
"Component", "Details", "Toggle firstItemId" };
- private static final String[] DETAILS_GENERATOR_NULL = new String[] {
+ private static final String[] DETAILS_GENERATOR_NULL = {
"Component", "Details", "Generators", "NULL" };
- private static final String[] DETAILS_GENERATOR_WATCHING = new String[] {
+ private static final String[] DETAILS_GENERATOR_WATCHING = {
"Component", "Details", "Generators", "\"Watching\"" };
- private static final String[] DETAILS_GENERATOR_PERSISTING = new String[] {
+ private static final String[] DETAILS_GENERATOR_PERSISTING = {
"Component", "Details", "Generators", "Persisting" };
- private static final String[] CHANGE_HIERARCHY = new String[] { "Component",
+ private static final String[] CHANGE_HIERARCHY = { "Component",
"Details", "Generators", "- Change Component" };
@Before
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java
index 33c543bb20..f751e60c2c 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java
@@ -42,11 +42,11 @@ public abstract class GridEditorTest extends GridBasicFeaturesTest {
.className("v-grid-editor-cancel");
protected static final By BY_EDITOR_SAVE = By
.className("v-grid-editor-save");
- protected static final String[] EDIT_ITEM_5 = new String[] { "Component",
+ protected static final String[] EDIT_ITEM_5 = { "Component",
"Editor", "Edit item 5" };
- protected static final String[] EDIT_ITEM_100 = new String[] { "Component",
+ protected static final String[] EDIT_ITEM_100 = { "Component",
"Editor", "Edit item 100" };
- protected static final String[] TOGGLE_EDIT_ENABLED = new String[] {
+ protected static final String[] TOGGLE_EDIT_ENABLED = {
"Component", "Editor", "Enabled" };
@Before
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java
index 312c0a3e63..74cf478291 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java
@@ -31,9 +31,9 @@ import com.vaadin.testbench.elements.GridElement.GridCellElement;
public class GridEditorUnbufferedTest extends GridEditorTest {
- private static final String[] TOGGLE_EDITOR_BUFFERED = new String[] {
+ private static final String[] TOGGLE_EDITOR_BUFFERED = {
"Component", "Editor", "Buffered mode" };
- private static final String[] CANCEL_EDIT = new String[] { "Component",
+ private static final String[] CANCEL_EDIT = { "Component",
"Editor", "Cancel edit" };
@Override