summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-09-05 12:33:39 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2016-09-05 10:02:48 +0000
commit504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3 (patch)
treee65c1813439a25bbab6c81e71c27ba8ccf69970b /uitest
parent6941d683eb15a8ae10e0d302bcf9608be8825f8a (diff)
downloadvaadin-framework-504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3.tar.gz
vaadin-framework-504b3c4c65c6a2ccfeeb1501eff7a29f5a3dbec3.zip
Use diamond operator where it can be used
Does not modify compatibility packages to keep to closer to Vaadin 7.7 Change-Id: Ic9c4944eb90218290545a04ecd7455eb63910012
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java6
-rw-r--r--uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java4
-rw-r--r--uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/Components.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/ListenerOrder.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestBench.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestMethodProperty.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/VaadinClasses.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.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/AbstractComponentTest.java32
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/HierarchicalContainerSorting.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBasedOnLong.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerDoubleFieldsWithDataSource.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/TextFieldConversions.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/accordion/RemoveTabs.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerGenerator.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxes2.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTimezone.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyPopupDateFieldTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/ValueThroughProperty.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/label/LabelPropertySourceValue.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectJump.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java14
-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/optiongroup/OptionGroups.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java6
-rwxr-xr-xuitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java2
-rwxr-xr-xuitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewOffScreen.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarGenericTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/NotselectablePaintSelections.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.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/table/TableRepairsScrollPositionOnReAddingAllRows.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSortingStopsWorkingOnChrome.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/Tables.java34
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationWaiAria.java2
-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/BigDecimalTextField.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapper.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/twincolselect/TwinColSelects.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UIsInMultipleTabs.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/TestUpload.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadAndDisableOnSuccess.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowZIndex.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest2.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/DDTest7.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotState.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/SettingsView.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/Log.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/Millionaire.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/Role.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/User.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/EscalatorBasicClientFeaturesWidget.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridCellFocusOnResetSizeWidget.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientDataSourcesWidget.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridColumnAutoWidthClientWidget.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDataChangeHandlerWidget.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDefaultTextRendererWidget.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridHeightByRowOnInitWidget.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/MySelectionModelConnector.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/PureGWTTestApplication.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridColumnWidthRecalculation.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDataSourceReset.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDefaultSelectionMode.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsDetach.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFormatChange.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeight.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSubPixelProblemWrapping.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/grid/basicfeatures/GridBasicFeatures.java28
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/textfield/AbstractTextFieldTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fields/TabIndexesTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java4
-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/GridHeightTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java2
230 files changed, 418 insertions, 418 deletions
diff --git a/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java
index b4ac8d5425..6108755058 100644
--- a/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java
+++ b/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java
@@ -100,9 +100,9 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
* The name of the application class currently used. Only valid within one
* request.
*/
- private LinkedHashSet<String> defaultPackages = new LinkedHashSet<String>();
+ private LinkedHashSet<String> defaultPackages = new LinkedHashSet<>();
- private transient final ThreadLocal<HttpServletRequest> request = new ThreadLocal<HttpServletRequest>();
+ private transient final ThreadLocal<HttpServletRequest> request = new ThreadLocal<>();
@Override
public void init(ServletConfig servletConfig) throws ServletException {
@@ -339,7 +339,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
File uitestDir = new File("uitest/src");
if (uitestDir.isDirectory()) {
- LinkedList<File> stack = new LinkedList<File>();
+ LinkedList<File> stack = new LinkedList<>();
stack.add(uitestDir);
long lastModifiedTimestamp = Long.MIN_VALUE;
diff --git a/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java
index d8319e6516..63ecc3c8db 100644
--- a/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java
+++ b/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java
@@ -217,7 +217,7 @@ public class DevelopmentServerLauncher {
interval = Integer.parseInt(serverArgs.get("scaninterval"));
}
- List<File> classFolders = new ArrayList<File>();
+ List<File> classFolders = new ArrayList<>();
String[] paths = serverArgs.get("autoreload").split(",");
if (paths.length == 1 && "all".equals(paths[0])) {
ClassLoader cl = server.getClass().getClassLoader();
@@ -370,7 +370,7 @@ public class DevelopmentServerLauncher {
* @return map of arguments key value pairs.
*/
protected static Map<String, String> parseArguments(String[] args) {
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
for (int i = 0; i < args.length; i++) {
final int d = args[i].indexOf("=");
if (d > 0 && d < args[i].length() && args[i].startsWith("--")) {
diff --git a/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java b/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java
index 857966af9c..419fe1213c 100644
--- a/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java
+++ b/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java
@@ -385,7 +385,7 @@ public class ScreenshotBrowser extends UI {
}
});
- BeanItemContainer<ComparisonFailure> container = new BeanItemContainer<ComparisonFailure>(
+ BeanItemContainer<ComparisonFailure> container = new BeanItemContainer<>(
ComparisonFailure.class);
for (File failure : failures) {
container.addBean(new ComparisonFailure(failure));
diff --git a/uitest/src/main/java/com/vaadin/tests/Components.java b/uitest/src/main/java/com/vaadin/tests/Components.java
index d16afa1232..eea70f6ad1 100644
--- a/uitest/src/main/java/com/vaadin/tests/Components.java
+++ b/uitest/src/main/java/com/vaadin/tests/Components.java
@@ -33,13 +33,13 @@ import com.vaadin.v7.ui.Tree.ItemStyleGenerator;
public class Components extends LegacyApplication {
private static final Object CAPTION = "c";
- private Map<Class<? extends AbstractComponentTest>, String> tests = new HashMap<Class<? extends AbstractComponentTest>, String>();
+ private Map<Class<? extends AbstractComponentTest>, String> tests = new HashMap<>();
private Tree naviTree;
private HorizontalSplitPanel sp;
private LegacyWindow mainWindow;
private final Embedded applicationEmbedder = new Embedded();
private String baseUrl;
- private List<Class<? extends Component>> componentsWithoutTests = new ArrayList<Class<? extends Component>>();
+ private List<Class<? extends Component>> componentsWithoutTests = new ArrayList<>();
{
for (Class<?> c : VaadinClasses.getBasicComponentTests()) {
@@ -49,7 +49,7 @@ public class Components extends LegacyApplication {
List<Class<? extends Component>> componentsWithoutTest = VaadinClasses
.getComponents();
- Set<String> availableTests = new HashSet<String>();
+ Set<String> availableTests = new HashSet<>();
for (String testName : tests.values()) {
availableTests.add(testName);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
index 915e120a7a..3e885f1078 100644
--- a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
@@ -24,7 +24,7 @@ public class ListenerOrder extends com.vaadin.server.LegacyApplication
Select s1;
- HashMap<String, Integer> buttonListeners = new HashMap<String, Integer>();
+ HashMap<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 e6f0405bf4..0dbe05fdee 100644
--- a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
@@ -37,7 +37,7 @@ public class OrderedLayoutSwapComponents extends CustomComponent {
private final AbstractOrderedLayout main;
- ArrayList<MyComponent> order = new ArrayList<MyComponent>();
+ ArrayList<MyComponent> order = new ArrayList<>();
public OrderedLayoutSwapComponents() {
diff --git a/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java b/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
index 3b045eb50b..3e17dc99f1 100644
--- a/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
@@ -43,7 +43,7 @@ public class StressComponentsInTable extends CustomComponent {
}
t.addContainerProperty("button", Button.class, null);
for (int i = 0; i < rows; i++) {
- final Vector<Object> content = new Vector<Object>();
+ final Vector<Object> content = new Vector<>();
for (int j = 0; j < cols; j++) {
content.add(rndString());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestBench.java b/uitest/src/main/java/com/vaadin/tests/TestBench.java
index f904925f1d..2f77086ed7 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestBench.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestBench.java
@@ -70,7 +70,7 @@ public class TestBench extends com.vaadin.server.LegacyApplication
VerticalLayout bodyLayout = new VerticalLayout();
// TODO this could probably be a simple Set
- HashMap<Class<?>, String> itemCaptions = new HashMap<Class<?>, String>();
+ HashMap<Class<?>, String> itemCaptions = new HashMap<>();
@Override
public void init() {
@@ -278,7 +278,7 @@ public class TestBench extends com.vaadin.server.LegacyApplication
*/
public static List<Class<?>> getTestableClassesForPackage(
String packageName) throws Exception {
- final ArrayList<File> directories = new ArrayList<File>();
+ final ArrayList<File> directories = new ArrayList<>();
try {
final ClassLoader cld = Thread.currentThread()
.getContextClassLoader();
@@ -297,7 +297,7 @@ public class TestBench extends com.vaadin.server.LegacyApplication
packageName + " does not appear to be a valid package.");
}
- final ArrayList<Class<?>> classes = new ArrayList<Class<?>>();
+ final ArrayList<Class<?>> classes = new ArrayList<>();
// For every directory identified capture all the .class files
for (final Iterator<File> it = directories.iterator(); it.hasNext();) {
final File directory = it.next();
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
index 27c93ad426..ce044db4a5 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
@@ -93,7 +93,7 @@ public class TestForChildComponentRendering extends CustomComponent {
public void randomReorder() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<Component>();
+ final ArrayList<Component> components = new ArrayList<>();
while (it.hasNext()) {
components.add(it.next());
}
@@ -110,7 +110,7 @@ public class TestForChildComponentRendering extends CustomComponent {
public void removeRandomComponent() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<Component>();
+ final ArrayList<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 3757a13829..eec5bcd27d 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
@@ -94,7 +94,7 @@ public class TestForGridLayoutChildComponentRendering extends CustomComponent {
public void randomReorder() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<Component>();
+ final ArrayList<Component> components = new ArrayList<>();
while (it.hasNext()) {
components.add(it.next());
}
@@ -118,7 +118,7 @@ public class TestForGridLayoutChildComponentRendering extends CustomComponent {
public void removeRandomComponent() {
final Iterator<Component> it = main.getComponentIterator();
- final ArrayList<Component> components = new ArrayList<Component>();
+ final ArrayList<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 c1face8492..47bc0413b7 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
@@ -61,7 +61,7 @@ public class TestForMultipleStyleNames extends CustomComponent
+ " on the browser. Currently changes are"
+ " visible only by inspecting DOM."));
- styleNames2 = new ArrayList<String>();
+ styleNames2 = new ArrayList<>();
styleNames2.add("red");
styleNames2.add("bold");
@@ -82,7 +82,7 @@ public class TestForMultipleStyleNames extends CustomComponent
final String currentStyle = l.getStyleName();
final String[] tmp = currentStyle.split(" ");
- final ArrayList<String> curStyles = new ArrayList<String>();
+ final ArrayList<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/TestForTablesInitialColumnWidthLogicRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
index 0cb616d084..2d2131a235 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
@@ -135,7 +135,7 @@ public class TestForTablesInitialColumnWidthLogicRendering
}
t.addContainerProperty("button", Button.class, null);
for (int i = 0; i < rows; i++) {
- final Vector<Object> content = new Vector<Object>();
+ final Vector<Object> content = new Vector<>();
for (int j = 0; j < cols; j++) {
content.add(rndString());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestMethodProperty.java b/uitest/src/main/java/com/vaadin/tests/TestMethodProperty.java
index 73da774a54..04e3104b79 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestMethodProperty.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestMethodProperty.java
@@ -11,7 +11,7 @@ public class TestMethodProperty {
MyTest myTest = new MyTest();
- MethodProperty<Integer> methodProperty2 = new MethodProperty<Integer>(
+ MethodProperty<Integer> methodProperty2 = new MethodProperty<>(
Integer.TYPE, myTest, "getInt", "setInt", new Object[0],
new Object[] { null }, 0);
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java b/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
index 48287f6945..80dbee4cfb 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
@@ -103,7 +103,7 @@ public class TestSelectAndDatefieldInDeepLayouts extends CustomComponent {
}
private Collection<String> getSelectOptions() {
- final Collection<String> opts = new Vector<String>(3);
+ final Collection<String> opts = new Vector<>(3);
opts.add(getCaption("opt 1"));
opts.add(getCaption("opt 2"));
opts.add(getCaption("opt 3"));
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
index 92dda09f97..6cde8350ed 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
@@ -233,7 +233,7 @@ public class TestSizeableIncomponents extends LegacyApplication {
class Testable {
private Class<?> classToTest;
- private ArrayList<Configuration> configurations = new ArrayList<Configuration>();
+ private ArrayList<Configuration> configurations = new ArrayList<>();
Testable(Class<?> c) {
classToTest = c;
diff --git a/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java b/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
index d2058fd886..28cfabbc43 100644
--- a/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
@@ -35,7 +35,7 @@ public class UsingObjectsInSelect extends com.vaadin.server.LegacyApplication
private final Label selectedTask = new Label("Selected task",
ContentMode.HTML);
- public LinkedList<?> exampleTasks = new LinkedList<Object>();
+ public LinkedList<?> exampleTasks = new LinkedList<>();
public static Random random = new Random(1);
diff --git a/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java b/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java
index dc09e7cc0c..bee83d8e01 100644
--- a/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java
+++ b/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java
@@ -90,7 +90,7 @@ public class VaadinClasses {
private static <T> List<Class<? extends T>> findClasses(Class<T> baseClass,
String basePackage, String[] ignoredPackages) throws IOException {
- List<Class<? extends T>> classes = new ArrayList<Class<? extends T>>();
+ List<Class<? extends T>> classes = new ArrayList<>();
String basePackageDirName = "/" + basePackage.replace('.', '/');
URL location = VaadinSession.class.getResource(basePackageDirName);
if (location.getProtocol().equals("file")) {
diff --git a/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java b/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
index fae301860b..c2df4fe38e 100644
--- a/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
+++ b/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.Window;
* @author Vaadin Ltd
*/
public class WindowWaiAriaRoles extends AbstractTestUI {
- Stack<Window> windows = new Stack<Window>();
+ Stack<Window> windows = new Stack<>();
/*
* (non-Javadoc)
diff --git a/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java b/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java
index 8ca03ca860..a93fadeba4 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java
@@ -54,7 +54,7 @@ public class DetachOldUIOnReload extends AbstractTestUIWithLog {
List<String> messages = (List<String>) getSession()
.getAttribute(PERSISTENT_MESSAGES_ATTRIBUTE);
if (messages == null) {
- messages = new ArrayList<String>();
+ messages = new ArrayList<>();
if (storeIfNeeded) {
getSession().setAttribute(PERSISTENT_MESSAGES_ATTRIBUTE,
messages);
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 5720834bd1..ef0a273172 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
@@ -294,7 +294,7 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
String subCategory = "Add component";
createCategory(subCategory, category);
- LinkedHashMap<String, Command<T, ComponentSize>> addCommands = new LinkedHashMap<String, AbstractComponentTestCase.Command<T, ComponentSize>>();
+ LinkedHashMap<String, Command<T, ComponentSize>> addCommands = new LinkedHashMap<>();
addCommands.put("Button", addButtonCommand);
addCommands.put("NativeButton", addNativeButtonCommand);
addCommands.put("TextField", addTextFieldCommand);
@@ -307,7 +307,7 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
addCommands.put("VerticalSplitPanel", addVerticalSplitPanelCommand);
addCommands.put("HorizontalSplitPanel", addHorizontalSplitPanelCommand);
- HashSet<String> noVerticalSize = new HashSet<String>();
+ HashSet<String> noVerticalSize = new HashSet<>();
noVerticalSize.add("TextField");
noVerticalSize.add("Button");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
index a3b432800c..2c51bd132d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
@@ -39,7 +39,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
private static final Resource SELECTED_ICON = new ThemeResource(
"../runo/icons/16/ok.png");
- private static final LinkedHashMap<String, String> sizeOptions = new LinkedHashMap<String, String>();
+ private static final LinkedHashMap<String, String> sizeOptions = new LinkedHashMap<>();
static {
sizeOptions.put("auto", null);
sizeOptions.put("50%", "50%");
@@ -61,13 +61,13 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
// Used to determine if a menuItem should be selected and the other
// unselected on click
- private Set<MenuItem> parentOfSelectableMenuItem = new HashSet<MenuItem>();
+ private Set<MenuItem> parentOfSelectableMenuItem = new HashSet<>();
/**
* Maps the category name to a menu item
*/
- private Map<String, MenuItem> categoryToMenuItem = new HashMap<String, MenuItem>();
- private Map<MenuItem, String> menuItemToCategory = new HashMap<MenuItem, String>();
+ private Map<String, MenuItem> categoryToMenuItem = new HashMap<>();
+ private Map<MenuItem, String> menuItemToCategory = new HashMap<>();
// Logging
private Log log;
@@ -292,7 +292,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
createBlurListener(CATEGORY_LISTENERS);
}
if (Focusable.class.isAssignableFrom(getTestClass())) {
- LinkedHashMap<String, Integer> tabIndexes = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> tabIndexes = new LinkedHashMap<>();
tabIndexes.put("0", 0);
tabIndexes.put("-1", -1);
tabIndexes.put("10", 10);
@@ -315,7 +315,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
private void createStyleNameSelect(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("Light blue background (background-lightblue)",
"background-lightblue");
@@ -333,7 +333,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
private void createErrorMessageSelect(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put(TEXT_SHORT, TEXT_SHORT);
options.put("Medium", TEXT_MEDIUM);
@@ -345,7 +345,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
private void createDescriptionSelect(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put(TEXT_SHORT, TEXT_SHORT);
options.put("Medium", TEXT_MEDIUM);
@@ -363,7 +363,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
protected LinkedHashMap<String, String> createCaptionOptions() {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("Short", TEXT_SHORT);
options.put("Medium", TEXT_MEDIUM);
@@ -394,7 +394,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
private void createIconSelect(String category) {
- LinkedHashMap<String, Resource> options = new LinkedHashMap<String, Resource>();
+ LinkedHashMap<String, Resource> options = new LinkedHashMap<>();
options.put("-", null);
options.put("16x16", ICON_16_USER_PNG_CACHEABLE);
options.put("32x32", ICON_32_ATTENTION_PNG_CACHEABLE);
@@ -404,7 +404,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
private void createLocaleSelect(String category) {
- LinkedHashMap<String, Locale> options = new LinkedHashMap<String, Locale>();
+ LinkedHashMap<String, Locale> options = new LinkedHashMap<>();
options.put("-", null);
options.put("fi_FI", new Locale("fi", "FI"));
options.put("en_US", Locale.US);
@@ -605,7 +605,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
protected <TYPE extends Enum<TYPE>> void createSelectAction(String caption,
String category, Class<TYPE> enumType, TYPE initialValue,
com.vaadin.tests.components.ComponentTestCase.Command<T, TYPE> command) {
- LinkedHashMap<String, TYPE> options = new LinkedHashMap<String, TYPE>();
+ LinkedHashMap<String, TYPE> options = new LinkedHashMap<>();
for (TYPE value : EnumSet.allOf(enumType)) {
options.put(value.toString(), value);
}
@@ -633,7 +633,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
com.vaadin.tests.components.ComponentTestCase.Command<T, Boolean> command,
boolean defaultValue) {
- LinkedHashMap<String, Boolean> defaultValues = new LinkedHashMap<String, Boolean>();
+ LinkedHashMap<String, Boolean> defaultValues = new LinkedHashMap<>();
for (String option : options.keySet()) {
defaultValues.put(option, defaultValue);
@@ -677,7 +677,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
protected LinkedHashMap<String, Integer> createIntegerOptions(int max) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
for (int i = 0; i <= 9 && i <= max; i++) {
options.put(String.valueOf(i), i);
}
@@ -695,7 +695,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
protected LinkedHashMap<String, Double> createDoubleOptions(double max) {
- LinkedHashMap<String, Double> options = new LinkedHashMap<String, Double>();
+ LinkedHashMap<String, Double> options = new LinkedHashMap<>();
for (double d = 0; d <= max && d < 10; d += 0.5) {
options.put(String.valueOf(d), d);
}
@@ -714,7 +714,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
protected LinkedHashMap<String, Resource> createIconOptions(
boolean cacheable) {
- LinkedHashMap<String, Resource> options = new LinkedHashMap<String, Resource>();
+ LinkedHashMap<String, Resource> options = new LinkedHashMap<>();
options.put("-", null);
if (cacheable) {
options.put("16x16", ICON_16_USER_PNG_CACHEABLE);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
index 3e25b01893..bdb1ff3f83 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
@@ -35,7 +35,7 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent>
protected static final ThemeResource ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE = uncacheableThemeResource(
"../runo/icons/64/email-reply.png");
- private List<T> testComponents = new ArrayList<T>();
+ private List<T> testComponents = new ArrayList<>();
abstract protected Class<T> getTestClass();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java
index 525e28b41d..82fbaee568 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java
@@ -56,7 +56,7 @@ public abstract class AbstractLayoutTest<T extends AbstractLayout>
}
private void createMarginsSelect(String category) {
- LinkedHashMap<String, MarginInfo> options = new LinkedHashMap<String, MarginInfo>();
+ LinkedHashMap<String, MarginInfo> options = new LinkedHashMap<>();
options.put("off", new MarginInfo(false));
options.put("all", new MarginInfo(true));
options.put("left", new MarginInfo(false, false, false, true));
@@ -77,7 +77,7 @@ public abstract class AbstractLayoutTest<T extends AbstractLayout>
String alignmentCategory = "Component alignment";
createCategory(alignmentCategory, category);
- LinkedHashMap<String, Alignment> options = new LinkedHashMap<String, Alignment>();
+ LinkedHashMap<String, Alignment> options = new LinkedHashMap<>();
options.put("Top left", Alignment.TOP_LEFT);
options.put("Top center", Alignment.TOP_CENTER);
options.put("Top right", Alignment.TOP_RIGHT);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
index b345414459..0e91dd9109 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
@@ -55,7 +55,7 @@ public abstract class AbstractOrderedLayoutTest<T extends AbstractOrderedLayout>
String expandRatioCategory = "Component expand ratio";
createCategory(expandRatioCategory, category);
- LinkedHashMap<String, Float> options = new LinkedHashMap<String, Float>();
+ LinkedHashMap<String, Float> options = new LinkedHashMap<>();
options.put("0", 0f);
options.put("0.5", 0.5f);
for (float f = 1; f <= 5; f++) {
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 5c73c851a5..2786eb8558 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
@@ -67,7 +67,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<Component>();
+ ArrayList<Component> actions = new ArrayList<>();
actions.add(createEnabledAction(true));
actions.add(createReadonlyAction(false));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java b/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java
index 59b1e86483..898c1014fc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java
@@ -14,7 +14,7 @@ public class ErrorMessages extends TestBase {
@Override
protected void setup() {
Button bb = new Button("Button with CompositeError");
- List<UserError> errors = new ArrayList<UserError>();
+ List<UserError> errors = new ArrayList<>();
errors.add(new UserError("Error 1"));
errors.add(new UserError("Error 2"));
bb.setComponentError(new CompositeErrorMessage(errors));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java b/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java
index 29c8ab5eaa..141ef664b4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java
@@ -54,7 +54,7 @@ public class FileDownloaderUI extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
- List<Class<? extends Component>> components = new ArrayList<Class<? extends Component>>();
+ List<Class<? extends Component>> components = new ArrayList<>();
components.add(Button.class);
components.add(NativeButton.class);
components.add(CssLayout.class);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/HierarchicalContainerSorting.java b/uitest/src/main/java/com/vaadin/tests/components/HierarchicalContainerSorting.java
index d42dce8512..7f633c307c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/HierarchicalContainerSorting.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/HierarchicalContainerSorting.java
@@ -80,7 +80,7 @@ public class HierarchicalContainerSorting extends TestBase {
}
private static int index = 0;
- private static Map<String, Integer> nameToId = new HashMap<String, Integer>();
+ private static Map<String, Integer> nameToId = new HashMap<>();
public static void addItem(IndexedContainer container, String string,
String parent) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java
index 763d7752b8..db6479bb0e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java
@@ -65,7 +65,7 @@ public abstract class AbstractComponentDataBindingTest extends TestBase
protected abstract void createFields();
- private Set<Component> fields = new HashSet<Component>();
+ private Set<Component> fields = new HashSet<>();
@Override
protected void addComponent(Component c) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
index feaa1371ec..a9256e68e7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
@@ -26,7 +26,7 @@ public class AbstractFieldCommitWithInvalidValues extends TestBase {
@Override
protected void setup() {
tf = new TextField("A field, must contain 1-2 chars",
- new ObjectProperty<String>("a"));
+ new ObjectProperty<>("a"));
tf.addValidator(
new StringLengthValidator("Invalid length", 1, 2, false));
tf.setBuffered(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java
index 27f15cee3f..1f69c96be3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java
@@ -10,7 +10,7 @@ import com.vaadin.v7.ui.TextField;
public class AbstractFieldDataSourceReadOnly extends TestBase {
private static class StateHolder {
- private ObjectProperty<String> textField = new ObjectProperty<String>(
+ private ObjectProperty<String> textField = new ObjectProperty<>(
"");
public ObjectProperty<String> getTextField() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java
index a3595b36b5..384b8be17a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java
@@ -11,7 +11,7 @@ public class DateFieldBackedByString extends AbstractComponentDataBindingTest {
DateField df = new DateField("Date field");
addComponent(df);
df.setPropertyDataSource(
- new com.vaadin.v7.data.util.ObjectProperty<String>(s,
+ new com.vaadin.v7.data.util.ObjectProperty<>(s,
String.class));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBasedOnLong.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBasedOnLong.java
index b4a2906576..b9fb03ad8f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBasedOnLong.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBasedOnLong.java
@@ -16,7 +16,7 @@ public class DateFieldBasedOnLong extends AbstractComponentDataBindingTest {
protected void createFields() {
PopupDateField pdf = new PopupDateField("DateField");
addComponent(pdf);
- property = new ObjectProperty<Long>(l, Long.class);
+ property = new ObjectProperty<>(l, Long.class);
pdf.setPropertyDataSource(property);
property.setValue(new Date(2011 - 1900, 4, 6).getTime());
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerDoubleFieldsWithDataSource.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerDoubleFieldsWithDataSource.java
index f436c4aca3..d5b8bdbb68 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerDoubleFieldsWithDataSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerDoubleFieldsWithDataSource.java
@@ -23,14 +23,14 @@ public class IntegerDoubleFieldsWithDataSource extends TestBase {
tf = createIntegerTextField();
tf.setCaption("Enter a double");
- tf.setPropertyDataSource(new ObjectProperty<Double>(2.1));
+ tf.setPropertyDataSource(new ObjectProperty<>(2.1));
tf.addValidator(new DoubleValidator("Must be a Double"));
addComponent(tf);
}
private TextField createIntegerTextField() {
final TextField tf = new TextField("Enter an integer");
- tf.setPropertyDataSource(new ObjectProperty<Integer>(new Integer(2)));
+ tf.setPropertyDataSource(new ObjectProperty<>(new Integer(2)));
tf.setImmediate(true);
tf.addListener(new ValueChangeListener() {
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 7829adf626..fd0e815ec9 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
@@ -82,7 +82,7 @@ public abstract class LegacyAbstractFieldTest<T extends AbstractField>
}
private void createRequiredErrorSelect(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put(TEXT_SHORT, TEXT_SHORT);
options.put("Medium", TEXT_MEDIUM);
@@ -191,7 +191,7 @@ public abstract class LegacyAbstractFieldTest<T extends AbstractField>
protected void createSetTextValueAction(String category) {
String subCategory = "Set text value";
createCategory(subCategory, category);
- List<String> values = new ArrayList<String>();
+ List<String> values = new ArrayList<>();
values.add("Test");
values.add("A little longer value");
values.add(
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java
index 6cacd68b59..f8a237417b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java
@@ -18,7 +18,7 @@ import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.TextField;
public class RequiredIndicatorForFieldsWithoutCaption extends AbstractTestUI {
- private Set<Field> fields = new HashSet<Field>();
+ private Set<Field> fields = new HashSet<>();
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/TextFieldConversions.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/TextFieldConversions.java
index 1158f677ff..4ee2eac6fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/TextFieldConversions.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/TextFieldConversions.java
@@ -33,7 +33,7 @@ public class TextFieldConversions extends AbstractComponentDataBindingTest {
@Override
public void valueChange(ValueChangeEvent event) {
- tf.setPropertyDataSource(new ObjectProperty<Object>(o,
+ tf.setPropertyDataSource(new ObjectProperty<>(o,
(Class<Object>) dataType.getValue()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/accordion/RemoveTabs.java b/uitest/src/main/java/com/vaadin/tests/components/accordion/RemoveTabs.java
index e82336c1e8..7ca7185500 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/accordion/RemoveTabs.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/accordion/RemoveTabs.java
@@ -109,7 +109,7 @@ public class RemoveTabs extends TestBase {
AbstractComponentContainer container = accordion;
if (container != null) {
- List<Component> c = new ArrayList<Component>();
+ List<Component> c = new ArrayList<>();
Iterator<Component> i = container.iterator();
while (i.hasNext()) {
Component comp = i.next();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerGenerator.java b/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerGenerator.java
index 2e5235c78b..6804983ed3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerGenerator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerGenerator.java
@@ -14,7 +14,7 @@ public class BeanItemContainerGenerator {
public static BeanItemContainer<TestBean> createContainer(int size,
long seed) {
- BeanItemContainer<TestBean> container = new BeanItemContainer<TestBean>(
+ BeanItemContainer<TestBean> container = new BeanItemContainer<>(
TestBean.class);
PortableRandom r = new PortableRandom(seed);
for (int i = 0; i < size; i++) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.java b/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.java
index 8612e60475..36c086515f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.java
@@ -24,12 +24,12 @@ public class TestBeanItemContainerUsage extends TestBase {
Table t = new Table("Table containing Persons");
t.setPageLength(5);
t.setWidth("100%");
- List<Person> persons = new ArrayList<Person>();
+ List<Person> persons = new ArrayList<>();
persons.add(new Person("Jones", "Birchman", 35));
persons.add(new Person("Marc", "Smith", 30));
persons.add(new Person("Greg", "Sandman", 75));
- BeanItemContainer<Person> bic = new BeanItemContainer<Person>(persons);
+ BeanItemContainer<Person> bic = new BeanItemContainer<>(persons);
t.setContainerDataSource(bic);
addComponent(t);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java
index 0ca638fa19..e9d50a3a7e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java
@@ -44,7 +44,7 @@ public class BeanItemContainerTestUI extends UI {
private Table table;
- private BeanItemContainer<BasicEvent> events = new BeanItemContainer<BasicEvent>(
+ private BeanItemContainer<BasicEvent> events = new BeanItemContainer<>(
BasicEvent.class);
@SuppressWarnings("deprecation")
@@ -157,7 +157,7 @@ public class BeanItemContainerTestUI extends UI {
fieldGroup.bind(startField, ContainerEventProvider.STARTDATE_PROPERTY);
fieldGroup.bind(endField, ContainerEventProvider.ENDDATE_PROPERTY);
- fieldGroup.setItemDataSource(new BeanItem<BasicEvent>(event,
+ fieldGroup.setItemDataSource(new BeanItem<>(event,
Arrays.asList(ContainerEventProvider.CAPTION_PROPERTY,
ContainerEventProvider.DESCRIPTION_PROPERTY,
ContainerEventProvider.STARTDATE_PROPERTY,
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java
index 7218c29248..9eb409de45 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java
@@ -45,7 +45,7 @@ public class CalendarActionEventSource extends AbstractTestUI {
public List<com.vaadin.v7.ui.components.calendar.event.CalendarEvent> getEvents(
Date startDate, Date endDate) {
- List<CalendarEvent> events = new ArrayList<CalendarEvent>();
+ List<CalendarEvent> events = new ArrayList<>();
CalendarEvent event = null;
try {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java
index 818eea0680..9fdf1e24d6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java
@@ -49,7 +49,7 @@ public class CalendarActionsMenuTest extends AbstractTestUI {
public List<com.vaadin.v7.ui.components.calendar.event.CalendarEvent> getEvents(
Date startDate, Date endDate) {
- List<CalendarEvent> events = new ArrayList<CalendarEvent>();
+ List<CalendarEvent> events = new ArrayList<>();
CalendarEvent event = null;
try {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
index c3742e2797..8bb73fe14b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
@@ -72,7 +72,7 @@ public class CalendarHtmlInEvents extends AbstractTestUIWithLog {
@Override
public List<CalendarEvent> getEvents(Date startDate, Date endDate) {
Date d = startDate;
- ArrayList<CalendarEvent> events = new ArrayList<CalendarEvent>();
+ ArrayList<CalendarEvent> events = new ArrayList<>();
while (d.before(endDate)) {
BasicEvent ce = new BasicEvent();
ce.setAllDay(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java
index 2ee8288ed3..7bd0bf1f88 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java
@@ -40,7 +40,7 @@ public class CalendarNotifications extends AbstractTestUIWithLog {
private static class DummyEventProvider implements CalendarEventProvider {
private int index;
- private List<CalendarEvent> events = new ArrayList<CalendarEvent>();
+ private List<CalendarEvent> events = new ArrayList<>();
public void addEvent(Date date) {
BasicEvent e = new BasicEvent();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java
index ef9761afb7..b7c2780ed8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java
@@ -49,7 +49,7 @@ public class CalendarResizeOverlappingEvents extends AbstractTestUI {
public List<CalendarEvent> getEvents(Date startDate, Date endDate) {
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
DateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
- List<CalendarEvent> events = new ArrayList<CalendarEvent>();
+ List<CalendarEvent> events = new ArrayList<>();
try {
java.util.Calendar today = java.util.Calendar.getInstance();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java
index 8c14211e18..a5648abf19 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java
@@ -39,7 +39,7 @@ public class NotificationTestUI extends UI {
private static class DummyEventProvider implements CalendarEventProvider {
private int index;
- private List<CalendarEvent> events = new ArrayList<CalendarEvent>();
+ private List<CalendarEvent> events = new ArrayList<>();
public void addEvent(Date date) {
BasicEvent e = new BasicEvent();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
index 7b47bed2c8..8cb6ab3ba8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
@@ -32,7 +32,7 @@ public class ComboBoxClickIcon extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- final List<String> items = new ArrayList<String>();
+ final List<String> items = new ArrayList<>();
items.add("A");
items.add("B");
items.add("C");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java
index c0316892d9..2a4d57c97f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java
@@ -18,7 +18,7 @@ public class ComboBoxDuplicateCaption extends TestBase {
@Override
protected void setup() {
- List<Person> list = new ArrayList<Person>();
+ List<Person> list = new ArrayList<>();
Person p1 = new Person();
p1.setFirstName("John");
p1.setLastName("Doe");
@@ -29,7 +29,7 @@ public class ComboBoxDuplicateCaption extends TestBase {
p2.setLastName("Doe");
list.add(p2);
- BeanItemContainer<Person> container = new BeanItemContainer<Person>(
+ BeanItemContainer<Person> container = new BeanItemContainer<>(
Person.class);
container.addAll(list);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxes2.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxes2.java
index b92b6c18a6..172d930cb3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxes2.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxes2.java
@@ -68,7 +68,7 @@ public class ComboBoxes2<T extends ComboBox> extends AbstractSelectTestCase<T> {
}
private void createFilteringModeAction(String category) {
- LinkedHashMap<String, FilteringMode> options = new LinkedHashMap<String, FilteringMode>();
+ LinkedHashMap<String, FilteringMode> options = new LinkedHashMap<>();
options.put("Off", FilteringMode.OFF);
options.put("Contains", FilteringMode.CONTAINS);
options.put("Starts with", FilteringMode.STARTSWITH);
@@ -79,7 +79,7 @@ public class ComboBoxes2<T extends ComboBox> extends AbstractSelectTestCase<T> {
}
private void createItemStyleGeneratorAction(String category) {
- LinkedHashMap<String, ItemStyleGenerator> options = new LinkedHashMap<String, ItemStyleGenerator>();
+ LinkedHashMap<String, ItemStyleGenerator> options = new LinkedHashMap<>();
options.put("-", null);
options.put("Bold fives", new ItemStyleGenerator() {
@Override
@@ -96,7 +96,7 @@ public class ComboBoxes2<T extends ComboBox> extends AbstractSelectTestCase<T> {
}
private void createInputPromptAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("Enter a value", "Enter a value");
options.put("- Click here -", "- Click here -");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java
index 84141e0785..17a0405690 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java
@@ -20,7 +20,7 @@ public class ComboFocusBlurEvents extends TestBase {
@Override
protected void setup() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (int i = 0; i < 100; i++) {
list.add("Item " + i);
}
@@ -31,7 +31,7 @@ public class ComboFocusBlurEvents extends TestBase {
cb.setDescription("Some Combobox");
addComponent(cb);
- final ObjectProperty<String> log = new ObjectProperty<String>("");
+ final ObjectProperty<String> log = new ObjectProperty<>("");
cb.addFocusListener(new FieldEvents.FocusListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java
index e6c70dafb6..18ac8ca8be 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java
@@ -26,7 +26,7 @@ public class ComboPushTiming extends TestBase {
@Override
protected void setup() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (int i = 0; i < 100; i++) {
list.add("Item " + i);
}
@@ -37,7 +37,7 @@ public class ComboPushTiming extends TestBase {
cb.setDescription("Some Combobox");
addComponent(cb);
- final ObjectProperty<String> log = new ObjectProperty<String>("");
+ final ObjectProperty<String> log = new ObjectProperty<>("");
cb.addFocusListener(new FieldEvents.FocusListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java
index b60a08cd8b..83f94aac8b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java
@@ -38,7 +38,7 @@ public class ComboboxMenuBarAutoopen extends AbstractTestUI {
protected void setup(VaadinRequest request) {
HorizontalLayout layout = new HorizontalLayout();
layout.setSpacing(true);
- ArrayList<String> options = new ArrayList<String>();
+ ArrayList<String> options = new ArrayList<>();
options.add("1");
options.add("2");
options.add("3");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
index e2da8be910..e5c4a33992 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
@@ -126,7 +126,7 @@ public class Comboboxes extends ComponentTestCase<ComboBox> {
private Component createIconSelect() {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("<None>", null);
options.put("16x16", "../runo/icons/16/user.png");
options.put("32x32", "../runo/icons/32/attention.png");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java
index 2a231e6534..534c92d5f4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java
@@ -132,7 +132,7 @@ public class CustomDateFormats extends TestBase {
}
- private Set<String> usedDebugIds = new HashSet<String>();
+ private Set<String> usedDebugIds = new HashSet<>();
private void addDateField(GridLayout gridLayout, String pattern,
Locale locale, String expectedDateFormat) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
index 2b660b8b0b..30a34e4fc4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
@@ -88,7 +88,7 @@ public class DateFieldEmptyValid extends TestBase {
@SuppressWarnings("deprecation")
public void buttonClick(ClickEvent event) {
log.log("Setting new object property (5.6.2000) to datefield");
- ObjectProperty<Date> dfProp = new ObjectProperty<Date>(
+ ObjectProperty<Date> dfProp = new ObjectProperty<>(
new Date(2000 - 1900, 6 - 1, 5), Date.class);
df.setPropertyDataSource(dfProp);
}
@@ -105,7 +105,7 @@ public class DateFieldEmptyValid extends TestBase {
@SuppressWarnings("deprecation")
public void buttonClick(ClickEvent event) {
log.log("Setting object property (with value null) to datefield and set value of property to 27.8.2005");
- ObjectProperty<Date> dfProp = new ObjectProperty<Date>(null,
+ ObjectProperty<Date> dfProp = new ObjectProperty<>(null,
Date.class);
df.setPropertyDataSource(dfProp);
dfProp.setValue(new Date(2005 - 1900, 8 - 1, 27));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
index c6422891fb..7a1717cdb6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
@@ -61,7 +61,7 @@ public class DateFieldRangeValidation extends TestBase {
@Override
protected void setup() {
- BeanItem<Range> bi = new BeanItem<Range>(range);
+ BeanItem<Range> bi = new BeanItem<>(range);
range.setFrom(new Date(2011 - 1900, 12 - 1, 4));
range.setTo(new Date(2011 - 1900, 12 - 1, 15));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java
index d8a165fa23..155ce35059 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java
@@ -42,7 +42,7 @@ public class DateFieldTest<T extends DateField>
}
private void createSetValueAction(String category) {
- LinkedHashMap<String, Date> options = new LinkedHashMap<String, Date>();
+ LinkedHashMap<String, Date> options = new LinkedHashMap<>();
options.put("(null)", null);
options.put("(current time)", new Date());
Calendar c = Calendar.getInstance(new Locale("fi", "FI"));
@@ -58,7 +58,7 @@ public class DateFieldTest<T extends DateField>
}
private void createDateFormatSelectAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("d M yyyy", "d M yyyy");
@@ -98,7 +98,7 @@ public class DateFieldTest<T extends DateField>
}
private void createResolutionSelectAction(String category) {
- LinkedHashMap<String, Resolution> options = new LinkedHashMap<String, Resolution>();
+ LinkedHashMap<String, Resolution> options = new LinkedHashMap<>();
options.put("Year", Resolution.YEAR);
options.put("Month", Resolution.MONTH);
options.put("Day", Resolution.DAY);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTimezone.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTimezone.java
index 33d1c659f0..69b331287b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTimezone.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTimezone.java
@@ -29,7 +29,7 @@ public class DateFieldTimezone extends TestBase {
protected void setup() {
dateField.setResolution(Resolution.SECOND);
- ArrayList<String> timeZoneCodes = new ArrayList<String>();
+ ArrayList<String> timeZoneCodes = new ArrayList<>();
timeZoneCodes.add(nullValue);
timeZoneCodes.addAll(Arrays.asList(TimeZone.getAvailableIDs()));
ComboBox timezoneSelector = new ComboBox("Select time zone",
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 669d691634..8136097040 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
@@ -70,7 +70,7 @@ public class InlineDateFields extends ComponentTestCase<InlineDateField> {
}
private Component createResolutionSelectAction() {
- LinkedHashMap<String, Resolution> options = new LinkedHashMap<String, Resolution>();
+ LinkedHashMap<String, Resolution> options = new LinkedHashMap<>();
options.put("Year", Resolution.YEAR);
options.put("Month", Resolution.MONTH);
options.put("Day", Resolution.DAY);
@@ -90,7 +90,7 @@ public class InlineDateFields extends ComponentTestCase<InlineDateField> {
}
private Component createLocaleSelectAction() {
- LinkedHashMap<String, Locale> options = new LinkedHashMap<String, Locale>();
+ LinkedHashMap<String, Locale> options = new LinkedHashMap<>();
for (Locale locale : LOCALES) {
options.put(locale.toString(), locale);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldTest.java
index 7f3b3872dc..8d42f1a561 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldTest.java
@@ -42,7 +42,7 @@ public class LegacyDateFieldTest<T extends DateField>
}
private void createSetValueAction(String category) {
- LinkedHashMap<String, Date> options = new LinkedHashMap<String, Date>();
+ LinkedHashMap<String, Date> options = new LinkedHashMap<>();
options.put("(null)", null);
options.put("(current time)", new Date());
Calendar c = Calendar.getInstance(new Locale("fi", "FI"));
@@ -58,7 +58,7 @@ public class LegacyDateFieldTest<T extends DateField>
}
private void createDateFormatSelectAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("d M yyyy", "d M yyyy");
@@ -98,7 +98,7 @@ public class LegacyDateFieldTest<T extends DateField>
}
private void createResolutionSelectAction(String category) {
- LinkedHashMap<String, Resolution> options = new LinkedHashMap<String, Resolution>();
+ LinkedHashMap<String, Resolution> options = new LinkedHashMap<>();
options.put("Year", Resolution.YEAR);
options.put("Month", Resolution.MONTH);
options.put("Day", Resolution.DAY);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyPopupDateFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyPopupDateFieldTest.java
index 1ce55d97b7..bdc29c64bc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyPopupDateFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyPopupDateFieldTest.java
@@ -21,7 +21,7 @@ public class LegacyPopupDateFieldTest
}
private void createInputPromptSelectAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("<none>", null);
options.put("Please enter date", "Please enter date");
options.put("åäöÅÄÖ", "åäöÅÄÖ");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTest.java
index 6e3250a825..54a23b5666 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTest.java
@@ -20,7 +20,7 @@ public class PopupDateFieldTest extends DateFieldTest<PopupDateField> {
}
private void createInputPromptSelectAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("<none>", null);
options.put("Please enter date", "Please enter date");
options.put("åäöÅÄÖ", "åäöÅÄÖ");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java
index 9bc567c0fc..60e90a8f1b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java
@@ -66,7 +66,7 @@ public class PopupDateFields extends ComponentTestCase<PopupDateField> {
}
private Component createResolutionSelectAction() {
- LinkedHashMap<String, Resolution> options = new LinkedHashMap<String, Resolution>();
+ LinkedHashMap<String, Resolution> options = new LinkedHashMap<>();
options.put("Year", Resolution.YEAR);
options.put("Month", Resolution.MONTH);
options.put("Day", Resolution.DAY);
@@ -86,7 +86,7 @@ public class PopupDateFields extends ComponentTestCase<PopupDateField> {
}
private Component createInputPromptSelectAction() {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("<none>", null);
options.put("Please enter date", "Please enter date");
options.put("åäöÅÄÖ", "åäöÅÄÖ");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java
index d4c48ac47e..29669e2a75 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java
@@ -54,7 +54,7 @@ public class RequiredInvalidDateField extends TestBase {
};
// not required
- Property<Date> dateProperty1 = new ObjectProperty<Date>(date);
+ Property<Date> dateProperty1 = new ObjectProperty<>(date);
DateField dateField1 = new DateField("Not required", dateProperty1);
dateField1.setLocale(new Locale("fi", "FI"));
dateField1.setResolution(DateField.RESOLUTION_DAY);
@@ -64,7 +64,7 @@ public class RequiredInvalidDateField extends TestBase {
addComponent(dateField1);
// required
- Property<Date> dateProperty2 = new ObjectProperty<Date>(date);
+ Property<Date> dateProperty2 = new ObjectProperty<>(date);
DateField dateField2 = new DateField("Required", dateProperty2);
dateField2.setLocale(new Locale("fi", "FI"));
dateField2.setResolution(DateField.RESOLUTION_DAY);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/ValueThroughProperty.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/ValueThroughProperty.java
index 98e94c49ee..e12004b515 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/ValueThroughProperty.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/ValueThroughProperty.java
@@ -16,7 +16,7 @@ import com.vaadin.v7.ui.Label;
import com.vaadin.v7.ui.PopupDateField;
public class ValueThroughProperty extends TestBase {
- private final Property<Date> dateProperty = new ObjectProperty<Date>(null,
+ private final Property<Date> dateProperty = new ObjectProperty<>(null,
Date.class);
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java
index f7db90acd9..0c8d2d8dd8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java
@@ -48,7 +48,7 @@ public class BasicJavaScriptComponent extends AbstractTestUI {
}
public static class TestState extends JavaScriptComponentState {
- private List<String> messages = new ArrayList<String>();
+ private List<String> messages = new ArrayList<>();
private URLReference url;
public List<String> getMessages() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/label/LabelPropertySourceValue.java b/uitest/src/main/java/com/vaadin/tests/components/label/LabelPropertySourceValue.java
index bbce7b7744..c51e24ceff 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/label/LabelPropertySourceValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/label/LabelPropertySourceValue.java
@@ -19,7 +19,7 @@ public class LabelPropertySourceValue extends AbstractTestUI {
button.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- ObjectProperty<String> p = new ObjectProperty<String>(
+ ObjectProperty<String> p = new ObjectProperty<>(
"This text should appear on the label after clicking the button.");
label.setPropertyDataSource(p);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java b/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java
index 0fe39fb6b1..f81ed25db9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java
@@ -41,7 +41,7 @@ public class LabelTest extends AbstractComponentTest<Label> {
private void createValueSelect(String category) {
String subCategory = "Set text value";
createCategory(subCategory, category);
- List<String> values = new ArrayList<String>();
+ List<String> values = new ArrayList<>();
values.add("Test");
values.add("A little longer value");
values.add(
@@ -59,7 +59,7 @@ public class LabelTest extends AbstractComponentTest<Label> {
@SuppressWarnings("deprecation")
private void createContentModeSelect(String category) {
- LinkedHashMap<String, ContentMode> options = new LinkedHashMap<String, ContentMode>();
+ LinkedHashMap<String, ContentMode> options = new LinkedHashMap<>();
options.put("Text", ContentMode.TEXT);
options.put("Preformatted", ContentMode.PREFORMATTED);
options.put("XHTML", ContentMode.HTML);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java b/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java
index f999d633cc..a0043b6649 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java
@@ -40,7 +40,7 @@ public class LinkTest extends AbstractComponentTest<Link> {
}
private void createTargetSelect(String category) {
- LinkedHashMap<String, Resource> options = new LinkedHashMap<String, Resource>();
+ LinkedHashMap<String, Resource> options = new LinkedHashMap<>();
options.put("-", null);
options.put("https://vaadin.com",
new ExternalResource("https://vaadin.com"));
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 9c446befd9..e719b4f13e 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
@@ -22,7 +22,7 @@ public class ListSelectJump extends AbstractTestUI {
+ "<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<String>();
+ ArrayList<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/MenuBarTest.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java
index ada6622c98..99c84793fc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java
@@ -67,7 +67,7 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
}
private void createMenuIconsSizeSelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("16x16", 16);
options.put("32x32", 32);
options.put("64x64", 64);
@@ -75,7 +75,7 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
}
private void createMenuItemIconIntervalSelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("None", 0);
options.put("All", 1);
options.put("Every second", 2);
@@ -85,7 +85,7 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
}
private void createSubMenuDensitySelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("All", 1);
options.put("Every second", 2);
options.put("Every third", 3);
@@ -95,7 +95,7 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
}
private void createSubMenuSeparatorDensitySelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("No separators", null);
options.put("Between all", 1);
options.put("Between every second", 2);
@@ -106,7 +106,7 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
}
private void createMenuItemDisabledDensitySelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("All enabled", null);
options.put("All disabled", 1);
options.put("Every second", 2);
@@ -117,7 +117,7 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
}
private void createMenuItemInvisibleDensitySelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("All visible", null);
options.put("All invisible", 1);
options.put("Every second", 2);
@@ -128,7 +128,7 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
}
private void createMenuItemCheckableDensitySelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("No items checkable", null);
options.put("All checkable", 1);
options.put("Every second", 2);
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 40e566194a..90dba78ec0 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<Component>();
+ ArrayList<Component> actions = new ArrayList<>();
actions.add(createErrorIndicatorAction(false));
actions.add(createEnabledAction(true));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java
index ea8893b230..48f168803b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java
@@ -31,7 +31,7 @@ public class OptionGroups extends AbstractSelectTestCase<OptionGroup> {
}
private void createIconToggle(String string) {
- LinkedHashMap<String, ThemeResource> options = new LinkedHashMap<String, ThemeResource>();
+ LinkedHashMap<String, ThemeResource> options = new LinkedHashMap<>();
options.put("-", null);
options.put("16x16", ICON_16_USER_PNG_CACHEABLE);
options.put("32x32", ICON_32_ATTENTION_PNG_CACHEABLE);
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 6339615104..79dc0a88ef 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
@@ -167,7 +167,7 @@ public class BoxLayoutTest extends AbstractTestUI {
controls.addComponent(layout);
layout.addComponent(new Label("Layout"));
- ArrayList<String> sizes = new ArrayList<String>();
+ ArrayList<String> sizes = new ArrayList<>();
sizes.addAll(Arrays.asList("100px", "30em", "100%"));
final NativeSelect width = new NativeSelect(null, sizes);
@@ -216,7 +216,7 @@ public class BoxLayoutTest extends AbstractTestUI {
controls.addComponent(cell);
cell.addComponent(new Label("Cell"));
- ArrayList<Alignment> alignments = new ArrayList<Alignment>();
+ ArrayList<Alignment> alignments = new ArrayList<>();
alignments.addAll(Arrays.asList(Alignment.TOP_LEFT,
Alignment.MIDDLE_LEFT, Alignment.BOTTOM_LEFT,
Alignment.TOP_CENTER, Alignment.MIDDLE_CENTER,
@@ -260,7 +260,7 @@ public class BoxLayoutTest extends AbstractTestUI {
root.addComponent(component);
component.addComponent(new Label("Component"));
- sizes = new ArrayList<String>();
+ sizes = new ArrayList<>();
sizes.addAll(Arrays.asList("50px", "200px", "10em", "50%", "100%"));
componentWidth = new NativeSelect(null, sizes);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java
index 35ad29c1d2..3812b62ee1 100755
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java
@@ -26,7 +26,7 @@ public class HorizontalRelativeSizeWithoutExpand extends UI {
Tree tree = new Tree();
tree.setSizeFull();
tree.setContainerDataSource(
- new BeanItemContainer<String>(String.class));
+ new BeanItemContainer<>(String.class));
String a = "aaaaaaaaaaaaaaaaaaaaaaaa";
String b = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
String c = "ccccccccccccccccccccccccccccccccccccccccccccccccc";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
index e714e0dbd4..82b2102518 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
@@ -80,7 +80,7 @@ public class OrderedLayoutCases extends AbstractTestUI {
// Why is Alignment not an enum? Now we have to use reflection just
// to get the different values as hardcoding is never an option! ;)
- List<String> alignmentValues = new ArrayList<String>();
+ List<String> alignmentValues = new ArrayList<>();
Field[] fields = Alignment.class.getDeclaredFields();
for (Field field : fields) {
if (field.getType() == Alignment.class) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java
index 4d8f2f94fc..25a5e9fdb2 100755
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java
@@ -29,7 +29,7 @@ public class VerticalRelativeSizeWithoutExpand extends UI {
Tree tree = new Tree();
tree.setSizeFull();
tree.setContainerDataSource(
- new BeanItemContainer<String>(String.class));
+ new BeanItemContainer<>(String.class));
String a = "aaaaaaaaaaaaaaaaaaaaaaaa";
String b = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
String c = "ccccccccccccccccccccccccccccccccccccccccccccccccc";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java
index e32347ab43..46ca309518 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java
@@ -74,7 +74,7 @@ public class PanelShouldRemoveActionHandler extends TestBase {
actionHandlers.remove(actionHandlers.size() - 1));
}
- private List<Handler> actionHandlers = new ArrayList<Handler>();
+ private List<Handler> actionHandlers = new ArrayList<>();
public void add() {
panel.setCaption(panel.getCaption() + " - Added handler");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewOffScreen.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewOffScreen.java
index 9e214e2598..06cc314cb8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewOffScreen.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewOffScreen.java
@@ -19,7 +19,7 @@ import com.vaadin.ui.themes.BaseTheme;
public class PopupViewOffScreen extends TestBase {
- private List<PopupView> popupViews = new ArrayList<PopupView>();
+ private List<PopupView> popupViews = new ArrayList<>();
@Override
protected String getDescription() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarGenericTest.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarGenericTest.java
index e83a9d054e..7c0d8dc7fb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarGenericTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarGenericTest.java
@@ -34,7 +34,7 @@ public class ProgressBarGenericTest
* @since
*/
protected void createPrimaryStyleNameSelect() {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
String primaryStyle = getComponent().getPrimaryStyleName();
options.put(primaryStyle, primaryStyle);
options.put(primaryStyle + "-foo", primaryStyle + "-foo");
@@ -45,7 +45,7 @@ public class ProgressBarGenericTest
}
private void createValueSelection(String categorySelection) {
- LinkedHashMap<String, Object> options = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> options = new LinkedHashMap<>();
options.put("null", null);
for (float f = 0; f <= 1; f += 0.1) {
options.put("" + f, f);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java
index c8480d2898..b5dfbc704d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java
@@ -59,7 +59,7 @@ public class ProgressIndicatorTest
}
private void createPollingIntervalAction() {
- LinkedHashMap<String, Integer> valueOptions = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> valueOptions = new LinkedHashMap<>();
for (int i = 100; i <= 3000; i += 200) {
valueOptions.put(String.valueOf(i), i);
}
@@ -69,7 +69,7 @@ public class ProgressIndicatorTest
}
private void createSetValueAction() {
- LinkedHashMap<String, Float> valueOptions = new LinkedHashMap<String, Float>();
+ LinkedHashMap<String, Float> valueOptions = new LinkedHashMap<>();
for (float f = 0.0f; f <= 1.0f; f += 0.1) {
valueOptions.put(String.valueOf(f), f);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaTest.java b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaTest.java
index 178bc28da8..376e84a1cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaTest.java
@@ -44,7 +44,7 @@ public class RichTextAreaTest extends LegacyAbstractFieldTest<RichTextArea> {
}
private void createNullRepresentationAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("null", "null");
options.put("This is empty", "This is empty");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java
index f1ef5d5bcb..a775092ab3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java
@@ -25,7 +25,7 @@ public abstract class AbstractSelectTestCase<T extends AbstractSelect>
protected static class ContextMenu {
- private List<Action> items = new ArrayList<Action>();
+ private List<Action> items = new ArrayList<>();
public ContextMenu(String caption, Resource icon) {
addItem(caption, icon);
@@ -73,7 +73,7 @@ public abstract class AbstractSelectTestCase<T extends AbstractSelect>
}
protected void createNullSelectItemId(String category) {
- LinkedHashMap<String, Object> options = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> options = new LinkedHashMap<>();
options.put("- None -", null);
for (Object id : (getComponent()).getContainerDataSource()
.getContainerPropertyIds()) {
@@ -110,7 +110,7 @@ public abstract class AbstractSelectTestCase<T extends AbstractSelect>
}
protected void createItemsInContainerSelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
for (int i = 0; i <= 10; i++) {
options.put(String.valueOf(i), i);
}
@@ -125,7 +125,7 @@ public abstract class AbstractSelectTestCase<T extends AbstractSelect>
}
protected void createPropertiesInContainerSelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("0", 0);
for (int i = 0; i <= 10; i++) {
options.put(String.valueOf(i), i);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java b/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
index 54db9f4977..129445a2af 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
@@ -27,9 +27,9 @@ public class SelectDisplaysOldValue extends TestBase {
private Select controllerComboBox;
private Select slaveComboBox;
- private Map<Integer, String> controllerOptionMap = new HashMap<Integer, String>();
+ private Map<Integer, String> controllerOptionMap = new HashMap<>();
- private Map<String, List<String>> slaveOptionMapping = new HashMap<String, List<String>>();
+ private Map<String, List<String>> slaveOptionMapping = new HashMap<>();
private final Object NAME_PROPERTY_ID = "name";
public DynamicSelectTestCase() {
@@ -46,7 +46,7 @@ public class SelectDisplaysOldValue extends TestBase {
private void populateSlaveOptionMappings() {
for (String controllerOption : controllerOptionMap.values()) {
- List<String> slaveOptions = new ArrayList<String>();
+ List<String> slaveOptions = new ArrayList<>();
for (int i = 1; i <= 3; i++) {
slaveOptions.add(controllerOption + " - Slave " + i);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderTest.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderTest.java
index e8f3e0cfb8..9844961570 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderTest.java
@@ -57,7 +57,7 @@ public class SliderTest extends AbstractFieldTest<Slider, Double> {
}
private void createOrientationSelect(String category) {
- LinkedHashMap<String, SliderOrientation> options = new LinkedHashMap<String, SliderOrientation>();
+ LinkedHashMap<String, SliderOrientation> options = new LinkedHashMap<>();
options.put("Horizontal", SliderOrientation.HORIZONTAL);
options.put("Vertical", SliderOrientation.VERTICAL);
createSelectAction("Orientation", category, options, "Horizontal",
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java
index 1d962edafe..b140a64cab 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java
@@ -19,14 +19,14 @@ public class ColumnWidthsAfterChangeTableColumnsCountOrOrder
@Override
protected void setup(VaadinRequest request) {
- List<TestBean> beanList = new ArrayList<TestBean>();
+ List<TestBean> beanList = new ArrayList<>();
beanList.add(new TestBean(1, "name1", "descr1"));
beanList.add(new TestBean(2, "name2", "descr2"));
beanList.add(new TestBean(3, "name3", "descr3"));
beanList.add(new TestBean(4, "name4", "descr4"));
beanList.add(new TestBean(5, "name5", "descr5"));
- BeanItemContainer<TestBean> container = new BeanItemContainer<TestBean>(
+ BeanItemContainer<TestBean> container = new BeanItemContainer<>(
TestBean.class, beanList);
VerticalLayout layout = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java
index da04a1aac1..34cf62c055 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java
@@ -47,7 +47,7 @@ public class ContextMenuSize extends AbstractTestUI {
new Action("action4") };
}
});
- BeanItemContainer<Bean> container = new BeanItemContainer<Bean>(
+ BeanItemContainer<Bean> container = new BeanItemContainer<>(
Bean.class);
container.addBean(new Bean());
table.setContainerDataSource(container);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java b/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java
index 0f64f4772b..e00d042ef0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java
@@ -42,7 +42,7 @@ public class DndTableTargetDetails extends AbstractTestUI {
createSourceTable();
Table target = new Table();
- BeanItemContainer<TestBean> container = new BeanItemContainer<TestBean>(
+ BeanItemContainer<TestBean> container = new BeanItemContainer<>(
TestBean.class);
container.addBean(new TestBean("target-item"));
target.setContainerDataSource(container);
@@ -58,7 +58,7 @@ public class DndTableTargetDetails extends AbstractTestUI {
table.setPageLength(1);
table.setDragMode(TableDragMode.ROW);
table.setWidth(100, Unit.PERCENTAGE);
- BeanItemContainer<TestBean> container = new BeanItemContainer<TestBean>(
+ BeanItemContainer<TestBean> container = new BeanItemContainer<>(
TestBean.class);
container.addBean(new TestBean("item"));
table.setContainerDataSource(container);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java
index e68ce97fa4..923e5e0c43 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java
@@ -21,7 +21,7 @@ import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.Table;
public class DoublesInTable extends TestBase {
- BeanItemContainer<Person> personBeanItemContainer = new BeanItemContainer<Person>(
+ BeanItemContainer<Person> personBeanItemContainer = new BeanItemContainer<>(
Person.class);
private Table table;
@@ -86,7 +86,7 @@ public class DoublesInTable extends TestBase {
}
private static BeanItemContainer<Person> createContainer(int nr) {
- BeanItemContainer<Person> bic = new BeanItemContainer<Person>(
+ BeanItemContainer<Person> bic = new BeanItemContainer<>(
Person.class);
for (int i = 1; i <= nr; i++) {
Person p = new Person();
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 ae4c83e789..1b142e5f6b 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
@@ -58,7 +58,7 @@ public class EditableTableLeak extends TestBase {
}
private static class CachingFieldFactory extends DefaultFieldFactory {
- private final HashMap<Object, HashMap<Object, Field<?>>> cache = new HashMap<Object, HashMap<Object, Field<?>>>();
+ private final HashMap<Object, HashMap<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/EmptyRowsWhenScrolling.java b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java
index 9bc61690f3..015a8c213a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java
@@ -79,7 +79,7 @@ public class EmptyRowsWhenScrolling extends UI {
setCompositionRoot(mainLayout);
// Container with sample data
- BeanContainer<Integer, SimpleBean> container = new BeanContainer<Integer, SimpleBean>(
+ BeanContainer<Integer, SimpleBean> container = new BeanContainer<>(
SimpleBean.class);
container.setBeanIdProperty("id");
for (int i = 1; i <= 50; ++i) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java
index af1e7b4e7a..35a7f4d446 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java
@@ -99,7 +99,7 @@ public class ExpandingContainer extends AbstractContainer implements
return null;
}
final int index = ((Integer) itemId).intValue();
- return new BeanItem<MyBean>(new MyBean(index));
+ return new BeanItem<>(new MyBean(index));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java
index c6cba16f91..8673a36ed6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java
@@ -15,7 +15,7 @@ public class HeaderRightClickAfterDrag extends AbstractTestUI {
protected void setup(VaadinRequest request) {
Table table = new Table();
table.setContainerDataSource(
- new BeanItemContainer<TestBean>(TestBean.class));
+ new BeanItemContainer<>(TestBean.class));
for (int i = 0; i < 10; i++) {
table.addItem(new TestBean(i));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java b/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java
index 98b8c0151f..eff7837299 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java
@@ -15,11 +15,11 @@ public class KeyboardNavigationWithChangingContent extends TestBase {
@Override
protected void setup() {
- ValueHolder<String> v1 = new ValueHolder<String>("test1");
- ValueHolder<String> v2 = new ValueHolder<String>("test2");
- ValueHolder<String> v3 = new ValueHolder<String>("test3");
+ ValueHolder<String> v1 = new ValueHolder<>("test1");
+ ValueHolder<String> v2 = new ValueHolder<>("test2");
+ ValueHolder<String> v3 = new ValueHolder<>("test3");
@SuppressWarnings("unchecked")
- final BeanItemContainer<ValueHolder<String>> bic = new BeanItemContainer<ValueHolder<String>>(
+ final BeanItemContainer<ValueHolder<String>> bic = new BeanItemContainer<>(
Arrays.asList(v1, v2, v3));
final Table t = new Table(null, bic);
t.setSelectable(true);
@@ -40,7 +40,7 @@ public class KeyboardNavigationWithChangingContent extends TestBase {
bic.removeAllItems();
ValueHolder<String> v4 = null;
for (int i = 4; i < 30; i++) {
- v4 = new ValueHolder<String>("test" + i);
+ v4 = new ValueHolder<>("test" + i);
bic.addBean(v4);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java b/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java
index 58ec0f765d..f28b27a858 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java
@@ -51,7 +51,7 @@ public class LargeSelectionCausesNPE extends TestBase {
Button button = new Button("Update the first item");
Label nameLabel = new Label();
- HashSet<Object> markedRows = new HashSet<Object>();
+ HashSet<Object> markedRows = new HashSet<>();
Label selected = new Label();
public SelectionExample() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java b/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java
index bd99a2d5dd..83958176fa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java
@@ -37,7 +37,7 @@ public class LeftColumnAlignment extends AbstractTestUI {
protected void setup(VaadinRequest request) {
final Table table = new Table();
- BeanItemContainer<Bean> container = new BeanItemContainer<Bean>(
+ BeanItemContainer<Bean> container = new BeanItemContainer<>(
Bean.class);
Bean bean = new Bean();
bean.setName("property");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java b/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
index 783889c224..0fd201fc9a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
@@ -34,7 +34,7 @@ public class MultiSelectWithRemovedRow extends TestBase {
final Log log = new Log(5);
addComponent(log);
- final BeanItemContainer<Person> container = new BeanItemContainer<Person>(
+ final BeanItemContainer<Person> container = new BeanItemContainer<>(
Person.class,
Arrays.asList(new Person("Joe"), new Person("William"),
new Person("Jack"), new Person("Averell"),
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/NotselectablePaintSelections.java b/uitest/src/main/java/com/vaadin/tests/components/table/NotselectablePaintSelections.java
index 85eafb9333..dda9e34594 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/NotselectablePaintSelections.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/NotselectablePaintSelections.java
@@ -28,7 +28,7 @@ public class NotselectablePaintSelections extends TestBase {
t.setMultiSelect(true);
t.setPageLength(5);
t.addContainerProperty("Name", String.class, null);
- Set<Object> selected = new HashSet<Object>();
+ Set<Object> selected = new HashSet<>();
for (int i = 0; i < 30; i++) {
Item item = t.addItem(i);
item.getItemProperty("Name").setValue("Name " + i);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java b/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java
index 525e2f2ecf..44a489d20c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java
@@ -16,7 +16,7 @@ public class ReloadWidgets extends AbstractTestUI {
protected void setup(VaadinRequest request) {
final Table table = new Table(null,
- new BeanItemContainer<Bean>(Bean.class));
+ new BeanItemContainer<>(Bean.class));
table.setId("table");
table.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java b/uitest/src/main/java/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java
index d5c4a2ca4f..6678674dc6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java
@@ -55,7 +55,7 @@ public class ScrollCausesRequestLoop extends AbstractTestCase {
private static List<Person> createData() {
int count = 500;
- List<Person> data = new ArrayList<Person>(count);
+ List<Person> data = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
data.add(new Person("Person", "" + i, "Email", "Phone", "Street",
12345, "City"));
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 de5e4fef29..3d0d04bd40 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 AbstractTestUI {
table.setVisibleColumns(new String[] { "jobId" });
label.setValue("no Exception");
} catch (CacheUpdateException e) {
- ArrayList<String> propertyIds = new ArrayList<String>();
+ ArrayList<String> propertyIds = new ArrayList<>();
propertyIds.add("jobId");
table.setContainerDataSource(jobContainer, propertyIds);
label.setValue("Exception caught");
@@ -81,7 +81,7 @@ public class SetDataSourceWithPropertyIds extends AbstractTestUI {
private List<JobsBean> getBeanList() {
- List<JobsBean> list = new ArrayList<JobsBean>();
+ List<JobsBean> list = new ArrayList<>();
JobsBean jobsBean = new JobsBean();
jobsBean.setJobId("1");
list.add(jobsBean);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java
index dc824c60ec..c623c00a4a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java
@@ -53,7 +53,7 @@ public class TableJumpUI extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
- BeanItemContainer<TestObj> container = new BeanItemContainer<TestObj>(
+ BeanItemContainer<TestObj> container = new BeanItemContainer<>(
TestObj.class);
for (int i = 0; i < 2; i++) {
container.addBean(new TestObj(i));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java
index 4c3a599704..d148dbb569 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java
@@ -57,7 +57,7 @@ public class TableMoveFocusWithSelection extends AbstractTestUI {
@Override
public void layoutClick(LayoutClickEvent event) {
if (t.isMultiSelect()) {
- Set<Object> values = new HashSet<Object>(
+ Set<Object> values = new HashSet<>(
(Set<Object>) t.getValue());
values.add(l.getData());
t.setValue(values);
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 0439d15fe2..93bd94b774 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<TestObject>(count);
+ ArrayList<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/table/TableRepairsScrollPositionOnReAddingAllRows.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java
index a1177b7db3..87a1d5c296 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java
@@ -24,9 +24,9 @@ public class TableRepairsScrollPositionOnReAddingAllRows
@Override
protected void setup(VaadinRequest request) {
- final BeanItemContainer<TableItem> cont = new BeanItemContainer<TableItem>(
+ final BeanItemContainer<TableItem> cont = new BeanItemContainer<>(
TableItem.class);
- final List<TableItem> restoringItemList = new ArrayList<TableItem>();
+ final List<TableItem> restoringItemList = new ArrayList<>();
final Table table = new Table();
table.setWidth("400px");
@@ -51,7 +51,7 @@ public class TableRepairsScrollPositionOnReAddingAllRows
@Override
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
- List<TableItem> originalItemIds = new ArrayList<TableItem>(
+ List<TableItem> originalItemIds = new ArrayList<>(
cont.getItemIds());
cont.removeAllItems();
cont.addAll(originalItemIds);
@@ -71,7 +71,7 @@ public class TableRepairsScrollPositionOnReAddingAllRows
cont.removeAllItems();
// create new collection (of different items) with other
// size
- List<TableItem> itemList = new ArrayList<TableItem>();
+ List<TableItem> itemList = new ArrayList<>();
for (int i = 0; i < 79; i++) {
TableItem ti = new TableItem();
ti.setName("AnotherItem1_" + i);
@@ -128,7 +128,7 @@ public class TableRepairsScrollPositionOnReAddingAllRows
com.vaadin.ui.Button.ClickEvent event) {
cont.removeAllItems();
- List<TableItem> list = new ArrayList<TableItem>(
+ List<TableItem> list = new ArrayList<>(
restoringItemList);
TableItem ti = new TableItem();
ti.setName("AnotherItem3_" + 80);
@@ -160,7 +160,7 @@ public class TableRepairsScrollPositionOnReAddingAllRows
@Override
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
cont.removeAllItems();
- BeanItemContainer<TableItem> newContainer = new BeanItemContainer<TableItem>(
+ BeanItemContainer<TableItem> newContainer = new BeanItemContainer<>(
TableItem.class);
for (int i = 0; i < 50; i++) {
TableItem ti = new TableItem();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java
index d173c7f5c7..f9f0069e5c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java
@@ -12,7 +12,7 @@ public class TableSelectPagingOff extends TestBase {
@Override
protected void setup() {
Table table = new Table();
- BeanItemContainer<MyBean> dataSource = new BeanItemContainer<MyBean>(
+ BeanItemContainer<MyBean> dataSource = new BeanItemContainer<>(
getBeans());
table.setContainerDataSource(dataSource);
table.setSelectable(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java
index 995ab7e211..fd8c704f4c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java
@@ -16,7 +16,7 @@ public class TableSorting extends TestBase {
final Label showID = new Label("");
final Table testTable = new Table();
- BeanItemContainer<TestItem> cont = new BeanItemContainer<TestItem>(
+ BeanItemContainer<TestItem> cont = new BeanItemContainer<>(
TestItem.class);
for (int i = 0; i < 20; i++) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java
index 31e8c262fb..8f44801437 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java
@@ -56,7 +56,7 @@ public class TableSortingIndicator extends AbstractTestUI {
}
private Container buildContainer() {
- BeanItemContainer<TestBean> container = new BeanItemContainer<TestBean>(
+ BeanItemContainer<TestBean> container = new BeanItemContainer<>(
TestBean.class);
for (int i = 0; i < 100; ++i) {
TestBean item = new TestBean();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingStopsWorkingOnChrome.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingStopsWorkingOnChrome.java
index a319cbe7ea..e625608631 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingStopsWorkingOnChrome.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingStopsWorkingOnChrome.java
@@ -32,7 +32,7 @@ public class TableSortingStopsWorkingOnChrome extends AbstractTestUI {
table.setColumnReorderingAllowed(true);
table.setSizeFull();
- BeanItemContainer<TestItem> cont = new BeanItemContainer<TestItem>(
+ BeanItemContainer<TestItem> cont = new BeanItemContainer<>(
TestItem.class);
for (int i = 0; i < ROW_COUNT; i++) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java
index 59f5d3e49a..46853b9cb4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java
@@ -30,7 +30,7 @@ public class TableUnregisterComponent extends TestBase {
container.addContainerProperty(COL_B, String.class, "");
Item it = container.addItem("a");
- final ObjectProperty<String> valA = new ObjectProperty<String>(
+ final ObjectProperty<String> valA = new ObjectProperty<>(
"orgVal");
final TextField fieldA = new TextField(valA) {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java b/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java
index 6439dfa64b..608c706d66 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java
@@ -59,7 +59,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
private Command<T, Boolean> columnVisibleCommand = new Command<T, Boolean>() {
@Override
public void execute(Table c, Boolean visible, Object propertyId) {
- List<Object> visibleColumns = new ArrayList<Object>(
+ List<Object> visibleColumns = new ArrayList<>(
Arrays.asList(c.getVisibleColumns()));
if (visible) {
// Table should really check this... Completely fails without
@@ -491,7 +491,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createCellStyleAction(String categoryFeatures) {
- LinkedHashMap<String, CellStyleInfo> options = new LinkedHashMap<String, CellStyleInfo>();
+ LinkedHashMap<String, CellStyleInfo> options = new LinkedHashMap<>();
options.put("None", null);
options.put("Red row", new CellStyleInfo(
"tables-test-cell-style-red-row", "Item 2", null));
@@ -502,7 +502,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createGeneratedRowAction(String categoryFeatures) {
- LinkedHashMap<String, GeneratedRowInfo> options = new LinkedHashMap<String, GeneratedRowInfo>();
+ LinkedHashMap<String, GeneratedRowInfo> options = new LinkedHashMap<>();
options.put("None", null);
options.put("Every fifth row, spanned", new GeneratedRowInfo(5, false,
"foobarbaz this is a long one that should span."));
@@ -523,7 +523,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createColumnHeaderMode(String category) {
- LinkedHashMap<String, ColumnHeaderMode> columnHeaderModeOptions = new LinkedHashMap<String, ColumnHeaderMode>();
+ LinkedHashMap<String, ColumnHeaderMode> columnHeaderModeOptions = new LinkedHashMap<>();
columnHeaderModeOptions.put("Hidden", ColumnHeaderMode.HIDDEN);
columnHeaderModeOptions.put("Id", ColumnHeaderMode.ID);
columnHeaderModeOptions.put("Explicit", ColumnHeaderMode.EXPLICIT);
@@ -536,7 +536,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createValueSelection(String categorySelection) {
- LinkedHashMap<String, Object> options = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> options = new LinkedHashMap<>();
options.put("null", null);
for (int i = 1; i <= 10; i++) {
options.put("Item " + i, "Item " + i);
@@ -546,7 +546,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createContextMenuAction(String category) {
- LinkedHashMap<String, ContextMenu> options = new LinkedHashMap<String, ContextMenu>();
+ LinkedHashMap<String, ContextMenu> options = new LinkedHashMap<>();
options.put("None", null);
options.put("Item without icon", new ContextMenu("No icon", null));
ContextMenu cm = new ContextMenu();
@@ -663,7 +663,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
createBooleanAction("Collapsed", category, false, columnCollapsed,
propertyId);
t.log("Collapsed");
- LinkedHashMap<String, Align> options = new LinkedHashMap<String, Align>();
+ LinkedHashMap<String, Align> options = new LinkedHashMap<>();
options.put("Left", Align.LEFT);
options.put("Center", Align.CENTER);
options.put("Right", Align.RIGHT);
@@ -671,7 +671,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
createSelectAction("Alignment", category, options, "Left",
columnAlignmentCommand, propertyId);
t.log("Alignment");
- LinkedHashMap<String, Integer> widthOptions = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> widthOptions = new LinkedHashMap<>();
widthOptions.put("- remove -", -1);
for (int i : new int[] { 0, 1, 10, 100, 200, 400 }) {
widthOptions.put(i + "px", i);
@@ -680,7 +680,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
columnWidthCommand, propertyId);
t.log("Width");
- LinkedHashMap<String, Resource> iconOptions = new LinkedHashMap<String, Resource>();
+ LinkedHashMap<String, Resource> iconOptions = new LinkedHashMap<>();
iconOptions.put("- none -", null);
iconOptions.put("ok 16x16", ICON_16_USER_PNG_CACHEABLE);
iconOptions.put("help 16x16", ICON_16_HELP_PNG_CACHEABLE);
@@ -690,7 +690,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
columnIconCommand, propertyId);
t.log("Icon");
- LinkedHashMap<String, String> columnHeaderOptions = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> columnHeaderOptions = new LinkedHashMap<>();
columnHeaderOptions.put("- none -", null);
columnHeaderOptions.put("A", "A");
columnHeaderOptions.put("A nice column", "A nice column");
@@ -698,7 +698,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
createSelectAction("Column header", category, columnHeaderOptions,
"- none -", columnHeaderCommand, propertyId);
t.log("Header");
- LinkedHashMap<String, Float> expandOptions = new LinkedHashMap<String, Float>();
+ LinkedHashMap<String, Float> expandOptions = new LinkedHashMap<>();
expandOptions.put("- remove -", -1f);
for (float i : new float[] { 0, 1, 2, 3, 4, 5 }) {
expandOptions.put(i + "", i);
@@ -715,7 +715,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createRowHeaderModeSelect(String category) {
- LinkedHashMap<String, RowHeaderMode> options = new LinkedHashMap<String, RowHeaderMode>();
+ LinkedHashMap<String, RowHeaderMode> options = new LinkedHashMap<>();
options.put("Explicit", RowHeaderMode.EXPLICIT);
options.put("Explicit defaults id", RowHeaderMode.EXPLICIT_DEFAULTS_ID);
options.put("Hidden", RowHeaderMode.HIDDEN);
@@ -730,7 +730,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createFooterTextSelect(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("None", null);
options.put("Footer X", "Footer {id}");
options.put("X", "{id}");
@@ -740,7 +740,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
private void createHeaderTextCheckbox(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("None", null);
options.put("Col: {id}", "Col: {id}");
options.put("Header {id} - every second", "Header {id}");
@@ -803,7 +803,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
protected void createHeaderVisibilitySelect(String category) {
- LinkedHashMap<String, ColumnHeaderMode> options = new LinkedHashMap<String, ColumnHeaderMode>();
+ LinkedHashMap<String, ColumnHeaderMode> options = new LinkedHashMap<>();
options.put("Explicit", ColumnHeaderMode.EXPLICIT);
options.put("Explicit defaults id",
ColumnHeaderMode.EXPLICIT_DEFAULTS_ID);
@@ -823,7 +823,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
protected void createPageLengthSelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("0", 0);
options.put("5", 5);
options.put("10", 10);
@@ -845,7 +845,7 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
}
protected void createSelectionModeSelect(String category) {
- LinkedHashMap<String, SelectMode> options = new LinkedHashMap<String, SelectMode>();
+ LinkedHashMap<String, SelectMode> options = new LinkedHashMap<>();
options.put("None", SelectMode.NONE);
options.put("Single", SelectMode.SINGLE);
options.put("Multi - simple", SelectMode.MULTI_SIMPLE);
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 8607dfe42e..c58edc38a8 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
@@ -70,7 +70,7 @@ public class FirstTabNotVisibleWhenTabsheetNotClipped extends AbstractTestUI {
TabSheet tabsheet = new TabSheet();
String[] letters = { "A", "B", "C", "D" };
- HashMap<String, TabSheet.Tab> tabMap = new HashMap<String, TabSheet.Tab>();
+ HashMap<String, TabSheet.Tab> tabMap = new HashMap<>();
for (String letter : letters) {
VerticalLayout vLayout = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java
index 2b37c4358e..45890ced73 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java
@@ -133,7 +133,7 @@ public class RemoveTabs extends TestBase {
AbstractComponentContainer container = tabsheet;
if (container != null) {
- List<Component> c = new ArrayList<Component>();
+ List<Component> c = new ArrayList<>();
Iterator<Component> i = container.getComponentIterator();
while (i.hasNext()) {
Component comp = i.next();
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 0f08b19318..e17ec00227 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
@@ -32,7 +32,7 @@ import com.vaadin.v7.ui.TextField;
public class TabKeyboardNavigation extends AbstractTestUI {
int index = 1;
- ArrayList<Component> tabs = new ArrayList<Component>();
+ ArrayList<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 7f1792474e..09f1e7b55c 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
@@ -17,7 +17,7 @@ import com.vaadin.v7.ui.TextField;
public class TabKeyboardNavigationWaiAria extends AbstractTestUI {
int index = 1;
- ArrayList<Component> tabs = new ArrayList<Component>();
+ ArrayList<Component> tabs = new ArrayList<>();
TabSheet ts = new TabSheet();
@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 c106b5bde2..ece3693bfd 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
@@ -160,7 +160,7 @@ public class TabSheetTest<T extends TabSheet> extends
String captionOptions[] = new String[] { "", "{id}", "Tab {id}",
"A long caption for tab {id}" };
- LinkedHashMap<String, Resource> iconOptions = new LinkedHashMap<String, Resource>();
+ LinkedHashMap<String, Resource> iconOptions = new LinkedHashMap<>();
iconOptions.put("-", null);
iconOptions.put("16x16 (cachable)", ICON_16_USER_PNG_CACHEABLE);
iconOptions.put("16x16 (uncachable)", ICON_16_USER_PNG_UNCACHEABLE);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java
index 352bf86423..5de8cd1a19 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java
@@ -43,7 +43,7 @@ public class BigDecimalTextField extends AbstractTestUIWithLog {
setLocale(new Locale("fi", "FI"));
BeanBigDecimal beanBigDecimal = new BeanBigDecimal();
- BeanItem<BeanBigDecimal> beanItem = new BeanItem<BeanBigDecimal>(
+ BeanItem<BeanBigDecimal> beanItem = new BeanItem<>(
beanBigDecimal);
FormLayout formLayout = new FormLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java
index a9920c2ead..9c5f83e323 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java
@@ -45,7 +45,7 @@ public class TextFieldWithDataSourceAndInputPrompt extends AbstractTestUI {
"TextField with null data source value");
textField2.setInputPrompt("Me is input prompt");
textField2.setNullRepresentation(null);
- BeanItem<Pojo> beanItem = new BeanItem<Pojo>(new Pojo());
+ BeanItem<Pojo> beanItem = new BeanItem<>(new Pojo());
textField2.setPropertyDataSource(beanItem.getItemProperty("string"));
addComponent(textField2);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
index 15d5a1694a..79239da7e7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
@@ -15,7 +15,7 @@ public class TextFieldWithProperty extends TestBase {
final TextField tf1 = new TextField();
- final ObjectProperty<String> op = new ObjectProperty<String>("FOO");
+ final ObjectProperty<String> op = new ObjectProperty<>("FOO");
tf1.setPropertyDataSource(op);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java b/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java
index dbe64a5355..9694ce66d9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java
@@ -130,7 +130,7 @@ public class Trees extends AbstractSelectTestCase<Tree>
}
private void createContextMenuAction(String category) {
- LinkedHashMap<String, ContextMenu> options = new LinkedHashMap<String, ContextMenu>();
+ LinkedHashMap<String, ContextMenu> options = new LinkedHashMap<>();
options.put("None", null);
options.put("Item without icon", new ContextMenu("No icon", null));
ContextMenu cm = new ContextMenu();
@@ -146,7 +146,7 @@ public class Trees extends AbstractSelectTestCase<Tree>
private void createItemStyleGenerator(String category) {
- LinkedHashMap<String, com.vaadin.v7.ui.Tree.ItemStyleGenerator> options = new LinkedHashMap<String, com.vaadin.v7.ui.Tree.ItemStyleGenerator>();
+ LinkedHashMap<String, com.vaadin.v7.ui.Tree.ItemStyleGenerator> options = new LinkedHashMap<>();
options.put("-", null);
options.put(rootGreenSecondLevelRed.toString(),
@@ -173,7 +173,7 @@ public class Trees extends AbstractSelectTestCase<Tree>
}
protected void createSelectionModeSelect(String category) {
- LinkedHashMap<String, SelectMode> options = new LinkedHashMap<String, SelectMode>();
+ LinkedHashMap<String, SelectMode> options = new LinkedHashMap<>();
options.put("None", SelectMode.NONE);
options.put("Single", SelectMode.SINGLE);
options.put("Multi - simple", SelectMode.MULTI_SIMPLE);
@@ -245,7 +245,7 @@ public class Trees extends AbstractSelectTestCase<Tree>
secondLevel++;
}
- List<Object> itemIds = new ArrayList<Object>(c.getItemIds());
+ List<Object> itemIds = new ArrayList<>(c.getItemIds());
int nextItemId = roots;
for (int rootIndex = 0; rootIndex < roots; rootIndex++) {
@@ -282,7 +282,7 @@ public class Trees extends AbstractSelectTestCase<Tree>
}
private void createRootItemSelectAction(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
for (int i = 1; i <= 10; i++) {
options.put(String.valueOf(i), i);
}
@@ -295,7 +295,7 @@ public class Trees extends AbstractSelectTestCase<Tree>
}
private void createExpandCollapseActions(String category) {
- LinkedHashMap<String, Object> options = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> options = new LinkedHashMap<>();
for (Object id : getComponent().getItemIds()) {
options.put(id.toString(), id);
@@ -310,7 +310,7 @@ public class Trees extends AbstractSelectTestCase<Tree>
}
private void createChildrenAllowedAction(String category) {
- LinkedHashMap<String, Object> options = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> options = new LinkedHashMap<>();
for (Object id : getComponent().getItemIds()) {
options.put(id.toString(), id);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java
index c47d258d6f..8a6fb535c5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java
@@ -65,7 +65,7 @@ public class ProgrammaticSelect extends TestBase {
secondLevel++;
}
- List<Object> itemIds = new ArrayList<Object>(c.getItemIds());
+ List<Object> itemIds = new ArrayList<>(c.getItemIds());
int nextItemId = roots;
for (int rootIndex = 0; rootIndex < roots; rootIndex++) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java
index 137d91bb64..95f215b66b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java
@@ -11,7 +11,7 @@ public class RowHeightWithoutRows extends TestBase {
private TreeTable treeTable = new TreeTable();
- private BeanItemContainer<User> container = new BeanItemContainer<User>(
+ private BeanItemContainer<User> container = new BeanItemContainer<>(
User.class);
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java
index da41209a50..3824c6c5d0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java
@@ -115,7 +115,7 @@ public class TreeTableCacheOnPartialUpdates extends TestBase {
if (c instanceof Container.Indexed) {
return ((Container.Indexed) source).indexOfId(itemId);
} else {
- ArrayList<Object> list = new ArrayList<Object>(source.getItemIds());
+ ArrayList<Object> list = new ArrayList<>(source.getItemIds());
return list.indexOf(itemId);
}
@@ -160,9 +160,9 @@ public class TreeTableCacheOnPartialUpdates extends TestBase {
addComponent(cacheRateSelect);
treeTable = new TreeTable();
treeTable.addStyleName("table-equal-rowheight");
- testBeanContainer = new BeanItemContainer<TestBean>(TestBean.class);
+ testBeanContainer = new BeanItemContainer<>(TestBean.class);
- Map<String, Integer> hasChildren = new HashMap<String, Integer>();
+ Map<String, Integer> hasChildren = new HashMap<>();
hasChildren.put("1", 5);
hasChildren.put("3", 10);
hasChildren.put("5", 20);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapper.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapper.java
index 6b15367d6b..3e99374ae0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapper.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapper.java
@@ -12,7 +12,7 @@ import com.vaadin.v7.ui.TreeTable;
public class TreeTableContainerHierarchicalWrapper extends AbstractTestUI {
TreeTable treetable = new TreeTable();
- BeanItemContainer<Bean> beanContainer = new BeanItemContainer<Bean>(
+ BeanItemContainer<Bean> beanContainer = new BeanItemContainer<>(
Bean.class);
ContainerHierarchicalWrapper hierarchicalWrapper = new ContainerHierarchicalWrapper(
beanContainer);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java
index f5f7cc866c..e8903ed92f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java
@@ -158,7 +158,7 @@ public class TreeTableTest extends Tables<TreeTable>
secondLevel++;
}
- List<Object> itemIds = new ArrayList<Object>(c.getItemIds());
+ List<Object> itemIds = new ArrayList<>(c.getItemIds());
int nextItemId = roots;
for (int rootIndex = 0; rootIndex < roots; rootIndex++) {
@@ -195,7 +195,7 @@ public class TreeTableTest extends Tables<TreeTable>
}
private void createRootItemSelectAction(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
for (int i = 1; i <= 10; i++) {
options.put(String.valueOf(i), i);
}
@@ -208,7 +208,7 @@ public class TreeTableTest extends Tables<TreeTable>
}
private void createExpandCollapseActions(String category) {
- LinkedHashMap<String, Object> options = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> options = new LinkedHashMap<>();
for (Object id : getComponent().getItemIds()) {
options.put(id.toString(), id);
@@ -223,7 +223,7 @@ public class TreeTableTest extends Tables<TreeTable>
}
private void createChildrenAllowedAction(String category) {
- LinkedHashMap<String, Object> options = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> options = new LinkedHashMap<>();
for (Object id : getComponent().getItemIds()) {
options.put(id.toString(), id);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/twincolselect/TwinColSelects.java b/uitest/src/main/java/com/vaadin/tests/components/twincolselect/TwinColSelects.java
index fd16225636..230825d808 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/twincolselect/TwinColSelects.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/twincolselect/TwinColSelects.java
@@ -19,7 +19,7 @@ public class TwinColSelects extends AbstractSelectTestCase<TwinColSelect> {
}
private void createRowSelectAction() {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("-", 0);
for (int i = 1; i <= 10; i++) {
options.put(String.valueOf(i), i);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java b/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java
index 1632e1e613..dcb1dcf577 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java
@@ -32,8 +32,8 @@ public class CurrentUiRetained extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
- final ArrayList<UI> uiLog = new ArrayList<UI>();
- final ArrayList<Boolean> probeLog = new ArrayList<Boolean>();
+ final ArrayList<UI> uiLog = new ArrayList<>();
+ final ArrayList<Boolean> probeLog = new ArrayList<>();
final Thread thread = new Thread(new Runnable() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UIsInMultipleTabs.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
index 25bf40edde..c10da456b5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
@@ -13,7 +13,7 @@ import com.vaadin.ui.VerticalLayout;
public class UIsInMultipleTabs extends AbstractTestUIProvider {
// No cleanup -> will leak, but shouldn't matter for tests
- private static ConcurrentHashMap<VaadinSession, AtomicInteger> numberOfUIsOpened = new ConcurrentHashMap<VaadinSession, AtomicInteger>();
+ private static ConcurrentHashMap<VaadinSession, AtomicInteger> numberOfUIsOpened = new ConcurrentHashMap<>();
public static class TabUI extends UI {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java
index ef2ed2ffda..19a2148001 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java
@@ -35,7 +35,7 @@ import com.vaadin.ui.Window;
public class TestSampler extends TabSheet {
public static final String ICON_URL = "../runo/icons/16/help.png";
- private List<Component> components = new ArrayList<Component>();
+ private List<Component> components = new ArrayList<>();
private ComponentContainer currentTab;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
index b6ac6e2f97..9280faf600 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
@@ -20,8 +20,8 @@ public class FormsCssTest extends HorizontalLayout {
setWidth("100%");
VerticalLayout vl = new VerticalLayout();
- FieldGroup fg = new BeanFieldGroup<Person>(Person.class);
- fg.setItemDataSource(new BeanItem<Person>(new Person()));
+ FieldGroup fg = new BeanFieldGroup<>(Person.class);
+ fg.setItemDataSource(new BeanItem<>(new Person()));
for (Object propId : fg.getUnboundPropertyIds()) {
if (!"address".equals(propId)) {
vl.addComponent(fg.buildAndBind(propId));
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 ab8011010c..7441544a13 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
@@ -42,7 +42,7 @@ public class TablesCssTest extends GridLayout {
}
private void createTableWith(String caption, String primaryStyleName) {
- final HashSet<Object> markedRows = new HashSet<Object>();
+ final HashSet<Object> markedRows = new HashSet<>();
final Table t;
if (caption != null) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/TestUpload.java b/uitest/src/main/java/com/vaadin/tests/components/upload/TestUpload.java
index 9ca0cb9c38..cac26c2297 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/TestUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/TestUpload.java
@@ -46,7 +46,7 @@ public class TestUpload extends ComponentTestCase<Upload> implements Receiver {
@Override
protected List<Component> createActions() {
- List<Component> actions = new ArrayList<Component>();
+ List<Component> actions = new ArrayList<>();
actions.add(createEnabledAction(true));
return actions;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadAndDisableOnSuccess.java b/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadAndDisableOnSuccess.java
index 516ca2d7c9..c117f179f7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadAndDisableOnSuccess.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadAndDisableOnSuccess.java
@@ -79,7 +79,7 @@ public class TestUploadAndDisableOnSuccess extends ComponentTestCase<Upload>
@Override
protected List<Component> createActions() {
- List<Component> actions = new ArrayList<Component>();
+ List<Component> actions = new ArrayList<>();
actions.add(createButtonAction("Toggle Enabled",
new Command<Upload, Boolean>() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java b/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
index 857d84f261..d7aaab37ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
@@ -79,7 +79,7 @@ public class BottomComponentScrollsUp extends AbstractTestUI {
p.setContent(content);
content.setHeight("500px");
- List<String> items = new ArrayList<String>();
+ List<String> items = new ArrayList<>();
items.add("1");
items.add("2");
items.add("3");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java
index 6d9ced5d11..f4dae2aa75 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java
@@ -16,7 +16,7 @@ import com.vaadin.v7.ui.ComboBox;
public class SubWindowOrder extends TestBase {
- private BeanItemContainer<Window> windowlist = new BeanItemContainer<Window>(
+ private BeanItemContainer<Window> windowlist = new BeanItemContainer<>(
Window.class);
@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 47523067c9..dca7074f2e 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
@@ -167,7 +167,7 @@ public class WindowCloseShortcuts extends AbstractTestUI {
}
private String elementToHtml(Element producedElem, StringBuilder sb) {
- ArrayList<String> names = new ArrayList<String>();
+ ArrayList<String> names = new ArrayList<>();
for (Attribute a : producedElem.attributes().asList()) {
names.add(a.getKey());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java
index 300809e420..3eca52b468 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java
@@ -68,7 +68,7 @@ public class WindowShouldRemoveActionHandler extends AbstractTestUI {
removeActionHandler(actionHandlers.remove(actionHandlers.size() - 1));
}
- private List<Handler> actionHandlers = new ArrayList<Handler>();
+ private List<Handler> actionHandlers = new ArrayList<>();
public void add() {
Handler actionHandler = new Handler() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowZIndex.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowZIndex.java
index 5d1a2540b8..965dd470eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowZIndex.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowZIndex.java
@@ -25,7 +25,7 @@ public class WindowZIndex extends AbstractTestUI {
}
int windowCount = 0;
- Queue<Window> windows = new ArrayDeque<Window>();
+ Queue<Window> windows = new ArrayDeque<>();
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
index 1a5a7ff9f6..a423fbef0e 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
@@ -64,7 +64,7 @@ public class BeanItemContainerFilteringTest extends TestBase {
protected void setup() {
table = new Table();
try {
- container = new BeanItemContainer<TestBean>(TestBean.class);
+ container = new BeanItemContainer<>(TestBean.class);
table.setContainerDataSource(container);
table.setWidth(300, Sizeable.UNITS_PIXELS);
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java
index 0edd76e5a1..3946ec12be 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java
@@ -15,16 +15,16 @@ public class BeanItemContainerTest {
*/
public static void main(String[] args)
throws InstantiationException, IllegalAccessException {
- BeanItemContainer<Hello> c = new BeanItemContainer<Hello>(Hello.class);
+ BeanItemContainer<Hello> c = new BeanItemContainer<>(Hello.class);
c.addItem(new Hello());
- Collection<Hello> col = new LinkedList<Hello>();
+ Collection<Hello> col = new LinkedList<>();
for (int i = 0; i < 100; i++) {
col.add(new Hello());
}
col.add(new Hello2());
- c = new BeanItemContainer<Hello>(col);
+ c = new BeanItemContainer<>(col);
System.out.println(c + " contains " + c.size() + " objects");
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 c8b3604fd6..13d43f8349 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
@@ -120,7 +120,7 @@ public class FileSystemContainerInTreeTable extends TestBase {
if (c instanceof Container.Indexed) {
return ((Container.Indexed) source).indexOfId(itemId);
} else {
- ArrayList<Object> list = new ArrayList<Object>(source.getItemIds());
+ ArrayList<Object> list = new ArrayList<>(source.getItemIds());
return list.indexOf(itemId);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java
index ea688c7380..73e709d79d 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java
@@ -83,7 +83,7 @@ public class DDTest2 extends TestBase {
@Override
protected Set<Object> getAllowedItemIds(DragAndDropEvent dragEvent,
Tree tree) {
- return new HashSet<Object>(tree.getItemIds());
+ return new HashSet<>(tree.getItemIds());
}
};
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 69c9e3cfe9..86f47ac505 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
@@ -79,7 +79,7 @@ public class DDTest6 extends TestBase {
tree1 = new Tree("Volume 1");
tree1.setImmediate(true);
- fs1 = new BeanItemContainer<File>(File.class);
+ fs1 = new BeanItemContainer<>(File.class);
tree1.setContainerDataSource(fs1);
for (int i = 0; i < files.length; i++) {
fs1.addBean(files[i]);
@@ -297,7 +297,7 @@ public class DDTest6 extends TestBase {
static class FolderView extends DragAndDropWrapper implements DropHandler {
- static final HashMap<Folder, FolderView> views = new HashMap<Folder, FolderView>();
+ static final HashMap<Folder, FolderView> views = new HashMap<>();
public static FolderView get(Folder f) {
@@ -342,7 +342,7 @@ public class DDTest6 extends TestBase {
// make modifiable
children = new HashSet<Object>(children);
}
- Set<Component> removed = new HashSet<Component>();
+ Set<Component> removed = new HashSet<>();
for (Iterator<Component> componentIterator = l
.getComponentIterator(); componentIterator.hasNext();) {
FileIcon next = (FileIcon) componentIterator.next();
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java
index 0c0a631c46..100ebc3dc1 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java
@@ -77,7 +77,7 @@ public class DDTest7 extends TestBase {
.getItem(draggedItemId).getItemProperty("Weight")
.getValue();
- HashSet<Object> accepted = new HashSet<Object>();
+ HashSet<Object> accepted = new HashSet<>();
for (Object itemId : visibleItemIds) {
Item item = table.getItem(itemId);
Integer w = (Integer) item.getItemProperty("Weight")
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 1d88541841..eec30f5b40 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
@@ -99,7 +99,7 @@ public class TreeDragStart extends TestBase {
if (sourceItemId instanceof BeanItem<?>) {
beanItem = (BeanItem<?>) sourceItemId;
} else if (sourceItemId instanceof InventoryObject) {
- beanItem = new BeanItem<InventoryObject>(
+ beanItem = new BeanItem<>(
(InventoryObject) sourceItemId);
}
@@ -137,9 +137,9 @@ public class TreeDragStart extends TestBase {
table.setDragMode(TableDragMode.ROW);
// Initialize the table container
- ArrayList<InventoryObject> collection = new ArrayList<InventoryObject>();
+ ArrayList<InventoryObject> collection = new ArrayList<>();
collection.add(new InventoryObject("Dummy Item", 0.0, false));
- final BeanItemContainer<InventoryObject> tableContainer = new BeanItemContainer<InventoryObject>(
+ final BeanItemContainer<InventoryObject> tableContainer = new BeanItemContainer<>(
collection);
table.setContainerDataSource(tableContainer);
table.setVisibleColumns(new String[] { "name", "weight" });
@@ -242,7 +242,7 @@ public class TreeDragStart extends TestBase {
}
}
- HashMap<String, InventoryObject> inventoryStore = new HashMap<String, InventoryObject>();
+ HashMap<String, InventoryObject> inventoryStore = new HashMap<>();
public HierarchicalContainer createTreeContent() {
final Object[] inventory = new Object[] {
@@ -281,14 +281,14 @@ public class TreeDragStart extends TestBase {
BeanItem<InventoryObject> item;
if (data[i].getClass() == InventoryObject.class) {
InventoryObject object = (InventoryObject) data[i];
- item = new BeanItem<InventoryObject>(object);
+ item = new BeanItem<>(object);
container.addItem(item);
container.setParent(item, parent);
container.setChildrenAllowed(item, false);
} else {// It's an Object[]
Object[] sub = (Object[]) data[i];
InventoryObject object = (InventoryObject) sub[0];
- item = new BeanItem<InventoryObject>(object);
+ item = new BeanItem<>(object);
container.addItem(item);
container.setParent(item, parent);
diff --git a/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java b/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java
index 670da355ef..ede0a23c7f 100644
--- a/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java
+++ b/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java
@@ -36,7 +36,7 @@ public class PotusCrud extends VerticalLayout {
private FieldGroup fg;
- private BeanItemContainer<Potus> potusContainer = new BeanItemContainer<Potus>(
+ private BeanItemContainer<Potus> potusContainer = new BeanItemContainer<>(
Potus.class);
public PotusCrud() {
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java b/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
index ff3ab1767b..39994eb970 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
@@ -48,7 +48,7 @@ public class BrowserPopupExtensionTest extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- List<Class<? extends Component>> components = new ArrayList<Class<? extends Component>>();
+ List<Class<? extends Component>> components = new ArrayList<>();
components.add(Button.class);
components.add(NativeButton.class);
components.add(Link.class);
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java
index 5c580b5f3d..1c1e2efcef 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java
@@ -85,7 +85,7 @@ public class BasicPersonForm extends AbstractTestUIWithLog {
Panel confPanel = new ConfigurationPanel();
addComponent(confPanel);
- final FieldGroup fieldGroup = new BeanFieldGroup<Person>(Person.class);
+ final FieldGroup fieldGroup = new BeanFieldGroup<>(Person.class);
fieldGroup.addCommitHandler(new CommitHandler() {
@Override
@@ -181,7 +181,7 @@ public class BasicPersonForm extends AbstractTestUIWithLog {
});
Person p = new Person("John", "Doe", "john@doe.com", 64, Sex.MALE,
new Address("John street", 11223, "John's town", Country.USA));
- fieldGroup.setItemDataSource(new BeanItem<Person>(p));
+ fieldGroup.setItemDataSource(new BeanItem<>(p));
}
@SuppressWarnings("unchecked")
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java
index 90ac03a67a..c2aeb51bab 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java
@@ -78,7 +78,7 @@ public class ComplexPerson {
}
public static BeanItemContainer<ComplexPerson> createContainer(int size) {
- BeanItemContainer<ComplexPerson> bic = new BeanItemContainer<ComplexPerson>(
+ BeanItemContainer<ComplexPerson> bic = new BeanItemContainer<>(
ComplexPerson.class);
Random r = new Random(size);
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java
index a45e346947..39a8d89153 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java
@@ -79,7 +79,7 @@ public class DateForm extends AbstractTestUIWithLog {
protected void setup(VaadinRequest request) {
setLocale(Locale.US);
addComponent(log);
- final FieldGroup fieldGroup = new BeanFieldGroup<DateObject>(
+ final FieldGroup fieldGroup = new BeanFieldGroup<>(
DateObject.class);
fieldGroup.setBuffered(true);
@@ -130,7 +130,7 @@ public class DateForm extends AbstractTestUIWithLog {
DateObject d = new DateObject(new Date(443457289789L),
new Date(443457289789L), new Date(443457289789L),
new Date(443457289789L));
- fieldGroup.setItemDataSource(new BeanItem<DateObject>(d));
+ fieldGroup.setItemDataSource(new BeanItem<>(d));
}
@SuppressWarnings("unchecked")
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java
index 15c205bbda..a4f236bd25 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java
@@ -31,7 +31,7 @@ public class FieldBinderWithBeanValidation extends TestBase {
protected void setup() {
addComponent(log);
- final BeanFieldGroup<PersonWithBeanValidationAnnotations> fieldGroup = new BeanFieldGroup<PersonWithBeanValidationAnnotations>(
+ final BeanFieldGroup<PersonWithBeanValidationAnnotations> fieldGroup = new BeanFieldGroup<>(
PersonWithBeanValidationAnnotations.class);
fieldGroup.buildAndBindMemberFields(this);
@@ -85,7 +85,7 @@ public class FieldBinderWithBeanValidation extends TestBase {
"John", "Doe", "john@doe.com", 64, Sex.MALE,
new Address("John street", 11223, "John's town", Country.USA));
fieldGroup.setItemDataSource(
- new BeanItem<PersonWithBeanValidationAnnotations>(p));
+ new BeanItem<>(p));
}
public static PersonWithBeanValidationAnnotations getPerson(
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java
index 2e3a855202..dd8b78510c 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java
@@ -20,14 +20,14 @@ public class FormBuilderWithNestedProperties extends TestBase {
@Override
protected void setup() {
- FieldGroup fieldGroup = new BeanFieldGroup<Person>(Person.class);
+ FieldGroup fieldGroup = new BeanFieldGroup<>(Person.class);
fieldGroup.buildAndBindMemberFields(this);
addComponent(firstName);
addComponent(lastName);
addComponent(streetAddress);
- fieldGroup.setItemDataSource(new BeanItem<Person>(new Person("Who",
+ fieldGroup.setItemDataSource(new BeanItem<>(new Person("Who",
"me?", "email", 1, Sex.MALE,
new Address("street name", 202020, "City", Country.FINLAND))));
}
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 d8637fe27f..fb57932caa 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
@@ -30,7 +30,7 @@ public class FormWithNestedProperties extends AbstractBeanFieldGroupTest {
protected void setup() {
super.setup();
- setFieldBinder(new BeanFieldGroup<Person>(Person.class));
+ setFieldBinder(new BeanFieldGroup<>(Person.class));
country = (NativeSelect) getFieldBinder().buildAndBind("country",
"address.country", NativeSelect.class);
getFieldBinder().bindMemberFields(this);
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
index 44b2c72cc2..ec715a30bb 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
@@ -22,7 +22,7 @@ public class MultipleValidationErrors extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- BeanItem<PersonBeanWithValidationAnnotations> item = new BeanItem<PersonBeanWithValidationAnnotations>(
+ BeanItem<PersonBeanWithValidationAnnotations> item = new BeanItem<>(
new PersonBeanWithValidationAnnotations());
final FieldGroup fieldGroup = new FieldGroup(item);
diff --git a/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java b/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java
index 76df6a99ba..0ec27edf5a 100644
--- a/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java
+++ b/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java
@@ -88,7 +88,7 @@ public class TabIndexes extends AbstractTestUIWithLog {
updateCaptions();
}
});
- fields = new ArrayList<Focusable>();
+ fields = new ArrayList<>();
Table t = new Table();
t.setSelectable(true);
t.addContainerProperty("foo", String.class, "bar");
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
index 20782e8d7e..c0ffcca0df 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
@@ -38,7 +38,7 @@ public class CaptionsInLayouts extends AbstractTestUI {
private HorizontalLayout horizontalLayout;
private GridLayout gridLayout;
private FormLayout formLayout;
- private List<AbstractField<?>> components = new ArrayList<AbstractField<?>>();
+ private List<AbstractField<?>> components = new ArrayList<>();
private CssLayout cssLayout;
private HorizontalLayout layoutParent = new HorizontalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
index 63b5aaba5f..60519cf1c0 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
@@ -15,7 +15,7 @@ import com.vaadin.ui.NativeButton;
public class CssLayoutCustomCss extends TestBase implements ClickListener {
- protected Map<Component, String> css = new HashMap<Component, String>();
+ protected Map<Component, String> css = new HashMap<>();
private CssLayout layout;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java
index 87bed151d4..fb182cc89a 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java
@@ -103,7 +103,7 @@ public class MovingComponentsWhileOldParentInvisible extends TestBase {
}
private Collection<Class<? extends HasComponents>> getComponentContainers() {
- List<Class<? extends HasComponents>> list = new ArrayList<Class<? extends HasComponents>>();
+ List<Class<? extends HasComponents>> list = new ArrayList<>();
list.add(AbsoluteLayout.class);
list.add(Accordion.class);
list.add(CssLayout.class);
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 0c0670c54d..4d1f0213c4 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
@@ -26,7 +26,7 @@ public class OrderedLayoutBasics extends TestBase {
String valignName[] = new String[] { "top", "middle", "bottom" };
- Set<AbstractOrderedLayout> layouts = new HashSet<AbstractOrderedLayout>();
+ Set<AbstractOrderedLayout> layouts = new HashSet<>();
private AbstractOrderedLayout layoutContainer;
private int suffix = 0;
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java
index e9214d2356..925edc1aaf 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java
@@ -21,7 +21,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class Broadcaster {
- private static final List<BroadcastListener> listeners = new CopyOnWriteArrayList<BroadcastListener>();
+ private static final List<BroadcastListener> listeners = new CopyOnWriteArrayList<>();
public static void register(BroadcastListener listener) {
listeners.add(listener);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java
index 1d7943d1d1..f81f5a8ba3 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java
@@ -19,7 +19,7 @@ import com.vaadin.v7.data.util.BeanItemContainer;
public class GridExampleHelper {
public static BeanItemContainer<GridExampleBean> createContainer() {
- BeanItemContainer<GridExampleBean> container = new BeanItemContainer<GridExampleBean>(
+ BeanItemContainer<GridExampleBean> container = new BeanItemContainer<>(
GridExampleBean.class);
for (int i = 0; i < 1000; i++) {
container.addItem(new GridExampleBean("Bean " + i, i * i, i / 10d));
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java
index 07ffab84a0..00da200d39 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java
@@ -39,12 +39,12 @@ public class AutoGeneratingForm extends UI {
layout.setMargin(true);
setContent(layout);
- FieldGroup fieldGroup = new BeanFieldGroup<Person>(Person.class);
+ FieldGroup fieldGroup = new BeanFieldGroup<>(Person.class);
// We need an item data source before we create the fields to be able to
// find the properties, otherwise we have to specify them by hand
fieldGroup.setItemDataSource(
- new BeanItem<Person>(new Person("John", "Doe", 34)));
+ new BeanItem<>(new Person("John", "Doe", 34)));
// Loop through the properties, build fields for them and add the fields
// to this root
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java
index bf2aecc102..7de1b8515d 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java
@@ -79,7 +79,7 @@ public class FormUsingExistingLayout extends AbstractTestUI {
// Create a field group and use it to bind the fields in the layout
FieldGroup fieldGroup = new FieldGroup(
- new BeanItem<Notice>(new Notice("John", "Doe", "")));
+ new BeanItem<>(new Notice("John", "Doe", "")));
fieldGroup.bindMemberFields(myFormLayout);
addComponent(myFormLayout);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
index cbda57bbc0..2717034a43 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
@@ -28,7 +28,7 @@ public class IntegerTextFieldDataSource extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
final MyBean myBean = new MyBean();
- BeanItem<MyBean> beanItem = new BeanItem<MyBean>(myBean);
+ BeanItem<MyBean> beanItem = new BeanItem<>(myBean);
final Property<Integer> integerProperty = beanItem
.getItemProperty("value");
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java
index 06932cbb9c..7affc2d2f2 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java
@@ -72,7 +72,7 @@ public class UsingBeanValidation extends UI {
@Override
protected void init(VaadinRequest request) {
Person person = new Person("John", 26);
- BeanItem<Person> item = new BeanItem<Person>(person);
+ BeanItem<Person> item = new BeanItem<>(person);
TextField firstName = new TextField("First name",
item.getItemProperty("name"));
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java
index 8d1f4a1f9f..af5aefbe22 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java
@@ -9,7 +9,7 @@ import com.vaadin.ui.Component;
public class WidgetContainer extends AbstractComponentContainer {
- List<Component> children = new ArrayList<Component>();
+ List<Component> children = new ArrayList<>();
@Override
public void addComponent(Component c) {
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java
index 5b0e42740f..64008cf093 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java
@@ -30,20 +30,20 @@ import com.vaadin.ui.UI;
@JavaScript("complex_types_connector.js")
public class ComplexTypesComponent extends AbstractJavaScriptComponent {
public void sendComplexTypes() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.add("First string");
list.add(null);
list.add("Another string");
- Map<String, Integer> stringMap = new HashMap<String, Integer>();
+ Map<String, Integer> stringMap = new HashMap<>();
stringMap.put("one", 1);
stringMap.put("two", 2);
- Map<Integer, String> otherMap = new HashMap<Integer, String>();
+ Map<Integer, String> otherMap = new HashMap<>();
otherMap.put(3, "3");
otherMap.put(4, "4");
- Map<Connector, String> connectorMap = new HashMap<Connector, String>();
+ Map<Connector, String> connectorMap = new HashMap<>();
connectorMap.put(this, "this");
connectorMap.put(UI.getCurrent(), "root");
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java
index 5b24247807..bb7e14c3dc 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java
@@ -51,7 +51,7 @@ public class Flot extends AbstractJavaScriptComponent {
}
public void addSeries(double... points) {
- List<List<Double>> pointList = new ArrayList<List<Double>>();
+ List<List<Double>> pointList = new ArrayList<>();
for (int i = 0; i < points.length; i++) {
pointList.add(Arrays.asList(Double.valueOf(i),
Double.valueOf(points[i])));
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotState.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotState.java
index 54cb65db05..b1c16e040b 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotState.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotState.java
@@ -6,5 +6,5 @@ import java.util.List;
import com.vaadin.shared.ui.JavaScriptComponentState;
public class FlotState extends JavaScriptComponentState {
- public List<List<List<Double>>> series = new ArrayList<List<List<Double>>>();
+ public List<List<List<Double>>> series = new ArrayList<>();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/SettingsView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/SettingsView.java
index 2c19ac03d7..b4091e8930 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/SettingsView.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/SettingsView.java
@@ -39,7 +39,7 @@ public class SettingsView extends Panel implements View {
date.setImmediate(true);
layout.addComponent(date);
// pretend we have a datasource:
- date.setPropertyDataSource(new ObjectProperty<Date>(new Date()));
+ date.setPropertyDataSource(new ObjectProperty<>(new Date()));
date.setBuffered(true);
// show buttons when date is changed
date.addValueChangeListener(new ValueChangeListener() {
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 73fec4026c..ea95e50e41 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
@@ -69,7 +69,7 @@ public class PushConfigurator extends VerticalLayout {
private void refreshStatus() {
PushConfiguration pc = ui.getPushConfiguration();
String value = "";
- ArrayList<String> names = new ArrayList<String>();
+ ArrayList<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/push/PushErrorHandling.java b/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
index 5abeedcea6..f5549e0eb6 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
@@ -60,7 +60,7 @@ public class PushErrorHandling extends AbstractTestUI {
AbstractInMemoryContainer.class) {
@Override
public Collection<String> getContainerPropertyIds() {
- List<String> cpropIds = new ArrayList<String>(
+ List<String> cpropIds = new ArrayList<>(
super.getContainerPropertyIds());
cpropIds.add("testid");
return cpropIds;
diff --git a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java
index ff2f39959b..eb43486eb6 100644
--- a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java
@@ -36,7 +36,7 @@ import com.vaadin.v7.ui.ListSelect;
public class RPCLoggerUI extends AbstractTestUIWithLog implements ErrorHandler {
- private List<Action> lastActions = new ArrayList<Action>();
+ private List<Action> lastActions = new ArrayList<>();
public static class Action {
public Action(ClientConnector connector, MethodInvocation invocation) {
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java b/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java
index e07abaa9f6..4537cf5212 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java
@@ -176,14 +176,14 @@ public class SerializerTest extends AbstractTestUI {
// rpc.sendListArray(
// new List[] { Arrays.asList(1, 2), Arrays.asList(3, 4) },
// new List[] { Collections.singletonList(new SimpleTestBean(-1)) });
- rpc.sendSet(new HashSet<Integer>(Arrays.asList(4, 7, 12)),
+ rpc.sendSet(new HashSet<>(Arrays.asList(4, 7, 12)),
Collections.singleton((Connector) this),
- new HashSet<SimpleTestBean>(Arrays.asList(new SimpleTestBean(1),
+ new HashSet<>(Arrays.asList(new SimpleTestBean(1),
new SimpleTestBean(2))));
- state.intSet = new HashSet<Integer>(Arrays.asList(4, 7, 12));
+ state.intSet = new HashSet<>(Arrays.asList(4, 7, 12));
state.connectorSet = Collections.singleton((Connector) this);
- state.beanSet = new HashSet<SimpleTestBean>(
+ state.beanSet = new HashSet<>(
Arrays.asList(new SimpleTestBean(1), new SimpleTestBean(2)));
rpc.sendMap(new HashMap<String, SimpleTestBean>() {
@@ -401,12 +401,12 @@ public class SerializerTest extends AbstractTestUI {
@Override
public void sendSet(Set<Integer> intSet,
Set<Connector> connectorSet, Set<SimpleTestBean> beanSet) {
- List<Integer> intList = new ArrayList<Integer>(intSet);
+ List<Integer> intList = new ArrayList<>(intSet);
Collections.sort(intList);
- List<Connector> connectorList = new ArrayList<Connector>(
+ List<Connector> connectorList = new ArrayList<>(
connectorSet);
Collections.sort(connectorList, new ConnectorComparator());
- List<SimpleTestBean> beanList = new ArrayList<SimpleTestBean>(
+ List<SimpleTestBean> beanList = new ArrayList<>(
beanSet);
Collections.sort(beanList, new SimpleBeanComparator());
log.log("sendSet: " + intList + ", "
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java
index 2981001530..c80d2818a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java
@@ -32,7 +32,7 @@ public class CollapsibleTableColumn extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
Table table = new Table();
- BeanItemContainer<Bean> container = new BeanItemContainer<Bean>(
+ BeanItemContainer<Bean> container = new BeanItemContainer<>(
Bean.class);
Bean bean = new Bean();
bean.setName("name");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
index cae1dbc29b..784c82304c 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
@@ -202,7 +202,7 @@ public class DateFields extends VerticalLayout implements View {
PropertysetItem item = new PropertysetItem();
item.addItemProperty("date",
- new ObjectProperty<Date>(getDefaultDate()));
+ new ObjectProperty<>(getDefaultDate()));
FormLayout form = new FormLayout();
form.setMargin(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
index 683e1a8cc0..df34961973 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
@@ -129,7 +129,7 @@ public class Dragging extends VerticalLayout implements View {
}
private List<Component> createComponents() {
- final List<Component> components = new ArrayList<Component>();
+ final List<Component> components = new ArrayList<>();
final Label label = new Label(
"This is a long text block that will wrap.");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java
index db58dd1feb..ba71072c43 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java
@@ -54,7 +54,7 @@ public class TestIcon {
"../runo/icons/" + imageSize + "/document.png");
}
- static List<FontAwesome> ICONS = new ArrayList<FontAwesome>();
+ static List<FontAwesome> ICONS = new ArrayList<>();
static {
ICONS.add(FontAwesome.ADJUST);
ICONS.add(FontAwesome.ADN);
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 db4e36e49a..1a84fd8718 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
@@ -65,7 +65,7 @@ public class ValoThemeUI extends UI {
private boolean testMode = false;
- private static LinkedHashMap<String, String> themeVariants = new LinkedHashMap<String, String>();
+ private static LinkedHashMap<String, String> themeVariants = new LinkedHashMap<>();
static {
themeVariants.put("tests-valo", "Default");
themeVariants.put("tests-valo-dark", "Dark");
@@ -80,7 +80,7 @@ public class ValoThemeUI extends UI {
menu.setId("testMenu");
}
private Navigator navigator;
- private LinkedHashMap<String, String> menuItems = new LinkedHashMap<String, String>();
+ private LinkedHashMap<String, String> menuItems = new LinkedHashMap<>();
@Override
protected void init(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java b/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java
index 7707fe0b77..75734e5391 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java
@@ -25,7 +25,7 @@ public class LargeContainer extends AbstractContainer
@Override
public Property<?> getItemProperty(Object propertyId) {
- ObjectProperty<String> property = new ObjectProperty<String>(
+ ObjectProperty<String> property = new ObjectProperty<>(
containerPropertyIdDefaults.get(propertyId) + " (item "
+ itemId + ")");
return property;
@@ -55,8 +55,8 @@ public class LargeContainer extends AbstractContainer
private int size = 1000;
- private Map<Object, Class<?>> containerPropertyIdTypes = new HashMap<Object, Class<?>>();
- private Map<Object, Object> containerPropertyIdDefaults = new HashMap<Object, Object>();
+ private Map<Object, Class<?>> containerPropertyIdTypes = new HashMap<>();
+ private Map<Object, Object> containerPropertyIdDefaults = new HashMap<>();
@Override
public Object nextItemId(Object itemId) {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/Log.java b/uitest/src/main/java/com/vaadin/tests/util/Log.java
index 54e266fa40..5c1391e932 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/Log.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/Log.java
@@ -8,7 +8,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
public class Log extends VerticalLayout {
- List<Label> eventLabels = new ArrayList<Label>();
+ List<Label> eventLabels = new ArrayList<>();
private boolean numberLogRows = true;
private int nextLogNr = 1;
diff --git a/uitest/src/main/java/com/vaadin/tests/util/Millionaire.java b/uitest/src/main/java/com/vaadin/tests/util/Millionaire.java
index 44d4def416..ba860eb843 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/Millionaire.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/Millionaire.java
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
public class Millionaire extends Person {
- private List<Address> secondaryResidences = new ArrayList<Address>();
+ private List<Address> secondaryResidences = new ArrayList<>();
public Millionaire() {
}
diff --git a/uitest/src/main/java/com/vaadin/tests/util/Role.java b/uitest/src/main/java/com/vaadin/tests/util/Role.java
index 5f7d7680fd..115250240e 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/Role.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/Role.java
@@ -6,7 +6,7 @@ import java.util.Set;
public class Role implements Serializable {
private String name = "";
- private Set<User> users = new HashSet<User>();
+ private Set<User> users = new HashSet<>();
public Role() {
}
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 b9f6d66b3e..750e0a4223 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java
@@ -7,7 +7,7 @@ import com.vaadin.ui.Button.ClickEvent;
public class TestClickListener implements Button.ClickListener {
- private static final HashMap<String, Integer> buttonListeners = new HashMap<String, Integer>();
+ private static final HashMap<String, Integer> buttonListeners = new HashMap<>();
String name = "";
int count = 0;
diff --git a/uitest/src/main/java/com/vaadin/tests/util/User.java b/uitest/src/main/java/com/vaadin/tests/util/User.java
index c5de9a3e46..1042eb630a 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/User.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/User.java
@@ -7,7 +7,7 @@ import java.util.Set;
public class User implements Serializable {
private String name = "";
- private Set<Role> roles = new HashSet<Role>();
+ private Set<Role> roles = new HashSet<>();
public User() {
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java
index 5f8472391c..59342e34e8 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java
@@ -29,7 +29,7 @@ public class RoundTripTesterConnector extends AbstractComponentConnector {
private double lastPrintedTime = -1;
private int receivedPings = 0;
- private List<Double> throughputData = new ArrayList<Double>();
+ private List<Double> throughputData = new ArrayList<>();
private int payloadSize = 0;
@Override
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 745af93b11..838ec9b238 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
@@ -52,18 +52,18 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
@Override
public void sendWrappedGenerics(
Map<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>> generics) {
- Map<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>> updated = new HashMap<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>>();
+ Map<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>> updated = new HashMap<>();
SimpleTestBean firstValue = generics.values().iterator().next()
.get(Integer.valueOf(1)).get(0);
- Set<SimpleTestBean> key = new HashSet<SimpleTestBean>(
+ Set<SimpleTestBean> key = new HashSet<>(
Arrays.asList(firstValue));
- Map<Integer, List<SimpleTestBean>> value = new HashMap<Integer, List<SimpleTestBean>>();
+ Map<Integer, List<SimpleTestBean>> value = new HashMap<>();
Set<SimpleTestBean> firstKeyValue = generics.keySet().iterator()
.next();
value.put(Integer.valueOf(1),
- new ArrayList<SimpleTestBean>(firstKeyValue));
+ new ArrayList<>(firstKeyValue));
updated.put(key, value);
@@ -83,7 +83,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
Set<Connector> connectorSet, Set<SimpleTestBean> beanSet) {
beanSet.iterator().next().setValue(intSet.size());
- Set<Integer> updatedIntSet = new HashSet<Integer>();
+ Set<Integer> updatedIntSet = new HashSet<>();
for (Integer integer : intSet) {
updatedIntSet.add(Integer.valueOf(-integer.intValue()));
@@ -107,7 +107,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
Map<Connector, SimpleTestBean> connectorMap,
Map<Integer, Connector> intMap,
Map<SimpleTestBean, SimpleTestBean> beanMap) {
- Map<SimpleTestBean, SimpleTestBean> updatedBeanMap = new HashMap<SimpleTestBean, SimpleTestBean>();
+ Map<SimpleTestBean, SimpleTestBean> updatedBeanMap = new HashMap<>();
for (Entry<SimpleTestBean, SimpleTestBean> entry : beanMap
.entrySet()) {
updatedBeanMap.put(entry.getValue(), entry.getKey());
@@ -208,7 +208,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
Arrays.asList(simpleBean, updatedSimpleBean));
updatedComplexBean.setPrivimite(complexBean.getPrivimite() + 1);
- ArrayList<SimpleTestBean> arrayList = new ArrayList<SimpleTestBean>(
+ ArrayList<SimpleTestBean> arrayList = new ArrayList<>(
Arrays.asList(array));
Collections.reverse(arrayList);
@@ -221,7 +221,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
List<Integer[]> objectArrayList,
List<SimpleTestBean[]> beanArrayList) {
Collections.reverse(beanArrayList);
- List<Integer[]> updatedObjectArrayList = new ArrayList<Integer[]>();
+ List<Integer[]> updatedObjectArrayList = new ArrayList<>();
for (int[] array : primitiveArrayList) {
updatedObjectArrayList
.add(new Integer[] { Integer.valueOf(array.length),
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java
index ac9ed4f7b5..7b10fba579 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java
@@ -66,7 +66,7 @@ public class TestWidgetConnector extends AbstractComponentConnector {
.create(TestWidgetRegistry.class);
public static abstract class TestWidgetRegistry {
- private Map<String, Invoker> creators = new HashMap<String, Invoker>();
+ private Map<String, Invoker> creators = new HashMap<>();
// Called by generated sub class
protected void register(String widgetClass, Invoker creator) {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/EscalatorBasicClientFeaturesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/EscalatorBasicClientFeaturesWidget.java
index a4a5ed0ee1..99a9ae2c8f 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/EscalatorBasicClientFeaturesWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/EscalatorBasicClientFeaturesWidget.java
@@ -27,7 +27,7 @@ public class EscalatorBasicClientFeaturesWidget
private static final int MAX_LOG = 9;
private final HTML html = new HTML();
- private final List<String> logs = new ArrayList<String>();
+ private final List<String> logs = new ArrayList<>();
private Escalator escalator;
public LogWidget() {
@@ -153,12 +153,12 @@ public class EscalatorBasicClientFeaturesWidget
private class Data {
private int columnCounter = 0;
private int rowCounter = 0;
- private final List<Integer> columns = new ArrayList<Integer>();
- private final List<Integer> rows = new ArrayList<Integer>();
+ private final List<Integer> columns = new ArrayList<>();
+ private final List<Integer> rows = new ArrayList<>();
@SuppressWarnings("boxing")
public void insertRows(final int offset, final int amount) {
- final List<Integer> newRows = new ArrayList<Integer>();
+ final List<Integer> newRows = new ArrayList<>();
for (int i = 0; i < amount; i++) {
newRows.add(rowCounter++);
}
@@ -167,7 +167,7 @@ public class EscalatorBasicClientFeaturesWidget
@SuppressWarnings("boxing")
public void insertColumns(final int offset, final int amount) {
- final List<Integer> newColumns = new ArrayList<Integer>();
+ final List<Integer> newColumns = new ArrayList<>();
for (int i = 0; i < amount; i++) {
newColumns.add(columnCounter++);
}
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 96e988b8ea..9014ed68b3 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
@@ -112,7 +112,7 @@ public class GridBasicClientFeaturesWidget
private class TestEditorHandler implements EditorHandler<List<Data>> {
- private Map<Grid.Column<?, ?>, TextBox> widgets = new HashMap<Grid.Column<?, ?>, TextBox>();
+ private Map<Grid.Column<?, ?>, TextBox> widgets = new HashMap<>();
private Label log = new Label();
@@ -220,7 +220,7 @@ public class GridBasicClientFeaturesWidget
* @return
*/
private List<List<Data>> createData(int rowCount) {
- List<List<Data>> dataList = new ArrayList<List<Data>>();
+ List<List<Data>> dataList = new ArrayList<>();
Random rand = new Random();
rand.setSeed(13334);
long timestamp = 0;
@@ -266,7 +266,7 @@ public class GridBasicClientFeaturesWidget
* @return
*/
private List<Data> createDataRow(int cols) {
- List<Data> list = new ArrayList<Data>(cols);
+ List<Data> list = new ArrayList<>(cols);
for (int i = 0; i < cols; ++i) {
list.add(new Data());
}
@@ -280,7 +280,7 @@ public class GridBasicClientFeaturesWidget
// Initialize data source
data = createData(ROWS);
- ds = new ListDataSource<List<Data>>(data);
+ ds = new ListDataSource<>(data);
grid = getTestedWidget();
grid.getElement().setId("testComponent");
grid.setDataSource(ds);
@@ -288,7 +288,7 @@ public class GridBasicClientFeaturesWidget
grid.setSelectionMode(SelectionMode.NONE);
grid.setEditorHandler(new TestEditorHandler());
- sorter = new ListSorter<List<Data>>(grid);
+ sorter = new ListSorter<>(grid);
// Create a bunch of grid columns
@@ -774,7 +774,7 @@ public class GridBasicClientFeaturesWidget
@Override
public void execute() {
- List<Column> columns = new ArrayList<Column>(grid.getColumns());
+ List<Column> columns = new ArrayList<>(grid.getColumns());
Collections.reverse(columns);
grid.setColumnOrder(
columns.toArray(new Column[columns.size()]));
@@ -980,7 +980,7 @@ public class GridBasicClientFeaturesWidget
@Override
public void execute() {
List<Column<?, List<Data>>> cols = grid.getColumns();
- ArrayList<Column> reordered = new ArrayList<Column>(cols);
+ ArrayList<Column> reordered = new ArrayList<>(cols);
final int index = cols.indexOf(column);
if (index == 0) {
Column<?, List<Data>> col = reordered.remove(0);
@@ -1332,7 +1332,7 @@ public class GridBasicClientFeaturesWidget
* Creates a collection of handlers for all the grid key events
*/
private void createKeyHandlers() {
- final List<VLabel> labels = new ArrayList<VLabel>();
+ final List<VLabel> labels = new ArrayList<>();
for (int i = 0; i < 9; ++i) {
VLabel tmp = new VLabel();
addNorth(tmp, 20);
@@ -1534,8 +1534,8 @@ public class GridBasicClientFeaturesWidget
private void createSidebarMenu() {
String[] menupath = new String[] { "Component", "Sidebar" };
- final List<MenuItem> customMenuItems = new ArrayList<MenuItem>();
- final List<MenuItemSeparator> separators = new ArrayList<MenuItemSeparator>();
+ final List<MenuItem> customMenuItems = new ArrayList<>();
+ final List<MenuItemSeparator> separators = new ArrayList<>();
addMenuCommand("Add item to end", new ScheduledCommand() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridCellFocusOnResetSizeWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridCellFocusOnResetSizeWidget.java
index ba598b6897..0fe861f723 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridCellFocusOnResetSizeWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridCellFocusOnResetSizeWidget.java
@@ -34,7 +34,7 @@ public class GridCellFocusOnResetSizeWidget
private Grid<String[]> grid;
private final class MyDataSource implements DataSource<String[]> {
- List<String[]> rows = new ArrayList<String[]>();
+ List<String[]> rows = new ArrayList<>();
int ROWS_MAX = 10;
int size = ROWS_MAX;
DataChangeHandler handler = null;
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java
index b7d6e03596..904ecbf1d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java
@@ -125,7 +125,7 @@ public class GridClientColumnRendererConnector
grid.setSelectionMode(Grid.SelectionMode.NONE);
// Generated some column data
- List<String> columnData = new ArrayList<String>();
+ List<String> columnData = new ArrayList<>();
for (int i = 0; i < 100; i++) {
columnData.add(String.valueOf(i));
}
@@ -133,10 +133,10 @@ public class GridClientColumnRendererConnector
// Provide data as data source
if (Location.getParameter("latency") != null) {
grid.setDataSource(new DelayedDataSource(
- new ListDataSource<String>(columnData),
+ new ListDataSource<>(columnData),
Integer.parseInt(Location.getParameter("latency"))));
} else {
- grid.setDataSource(new ListDataSource<String>(columnData));
+ grid.setDataSource(new ListDataSource<>(columnData));
}
// Add a column to display the data in
@@ -211,7 +211,7 @@ public class GridClientColumnRendererConnector
@SuppressWarnings("unchecked")
public void triggerClientSortingTest() {
Grid<String> grid = getWidget();
- ListSorter<String> sorter = new ListSorter<String>(
+ ListSorter<String> sorter = new ListSorter<>(
grid);
// Make sorter sort the numbers in natural order
@@ -236,7 +236,7 @@ public class GridClientColumnRendererConnector
@SuppressWarnings("unchecked")
public void shuffle() {
Grid<String> grid = getWidget();
- ListSorter<String> shuffler = new ListSorter<String>(
+ ListSorter<String> shuffler = new ListSorter<>(
grid);
// Make shuffler return random order
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientDataSourcesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientDataSourcesWidget.java
index c70359c1c4..9281002ae9 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientDataSourcesWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientDataSourcesWidget.java
@@ -102,7 +102,7 @@ public class GridClientDataSourcesWidget
private List<String[]> fetchRows(int firstRowIndex,
int numberOfRows) {
- List<String[]> rows = new ArrayList<String[]>();
+ List<String[]> rows = new ArrayList<>();
for (int i = 0; i < numberOfRows; i++) {
String id = String.valueOf(firstRowIndex + i);
rows.add(new String[] { id,
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridColumnAutoWidthClientWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridColumnAutoWidthClientWidget.java
index 8752fd0768..139835b31a 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridColumnAutoWidthClientWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridColumnAutoWidthClientWidget.java
@@ -48,10 +48,10 @@ public class GridColumnAutoWidthClientWidget
grid.setSelectionMode(SelectionMode.NONE);
grid.setWidth("750px");
- List<List<String>> list = new ArrayList<List<String>>();
+ List<List<String>> list = new ArrayList<>();
list.add(Arrays.asList("equal length", "a very long cell content",
"short", "fixed width narrow", "fixed width wide"));
- grid.setDataSource(new ListDataSource<List<String>>(list));
+ grid.setDataSource(new ListDataSource<>(list));
addColumn("equal length");
addColumn("short");
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDataChangeHandlerWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDataChangeHandlerWidget.java
index c90551dbf2..a354580645 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDataChangeHandlerWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDataChangeHandlerWidget.java
@@ -31,7 +31,7 @@ import com.vaadin.v7.client.widgets.Grid.Column;
public class GridDataChangeHandlerWidget extends Composite {
private final SimplePanel panel = new SimplePanel();
- private final Grid<String> grid = new Grid<String>();
+ private final Grid<String> grid = new Grid<>();
public static class DelayedDataSource extends ListDataSource<String> {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDefaultTextRendererWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDefaultTextRendererWidget.java
index dbeec1b0a7..2e61b293ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDefaultTextRendererWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDefaultTextRendererWidget.java
@@ -35,7 +35,7 @@ public class GridDefaultTextRendererWidget
super(new Grid<String>());
grid = getTestedWidget();
- grid.setDataSource(new ListDataSource<String>(NULL_STRING, "string"));
+ grid.setDataSource(new ListDataSource<>(NULL_STRING, "string"));
grid.addColumn(new Column<String, String>() {
@Override
public String getValue(String row) {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridHeightByRowOnInitWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridHeightByRowOnInitWidget.java
index 7813b3312c..d8a49d8c35 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridHeightByRowOnInitWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridHeightByRowOnInitWidget.java
@@ -11,13 +11,13 @@ import com.vaadin.v7.shared.ui.grid.HeightMode;
public class GridHeightByRowOnInitWidget extends Composite {
private final SimplePanel panel = new SimplePanel();
- private final Grid<String> grid = new Grid<String>();
+ private final Grid<String> grid = new Grid<>();
public GridHeightByRowOnInitWidget() {
initWidget(panel);
panel.setWidget(grid);
- grid.setDataSource(new ListDataSource<String>(
+ grid.setDataSource(new ListDataSource<>(
Arrays.asList("A", "B", "C", "D", "E")));
grid.addColumn(new Column<String, String>("letter") {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/MySelectionModelConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/MySelectionModelConnector.java
index 9cd0a26ed6..b5b1e688eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/MySelectionModelConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/MySelectionModelConnector.java
@@ -34,7 +34,7 @@ public class MySelectionModelConnector extends MultiSelectionModelConnector {
@Override
protected void extend(ServerConnector target) {
super.extend(target);
- handler = new ClickSelectHandler<JsonObject>(getGrid());
+ handler = new ClickSelectHandler<>(getGrid());
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/PureGWTTestApplication.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/PureGWTTestApplication.java
index 01b00b04cc..368d85e9de 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/PureGWTTestApplication.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/PureGWTTestApplication.java
@@ -99,8 +99,8 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
title = "";
menubar = new MenuBar();
menubar.getElement().setId("menu");
- children = new ArrayList<Menu>();
- items = new ArrayList<Command>();
+ children = new ArrayList<>();
+ items = new ArrayList<>();
}
/**
@@ -111,8 +111,8 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
public Menu(String title) {
this.title = title;
menubar = new MenuBar(true);
- children = new ArrayList<Menu>();
- items = new ArrayList<Command>();
+ children = new ArrayList<>();
+ items = new ArrayList<>();
}
/**
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java b/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java
index 2dcb5d5b3f..c03c375810 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java
@@ -118,7 +118,7 @@ public class TestWidgetRegistryGenerator extends Generator {
private List<JClassType> findTestWidgets(TreeLogger logger,
TypeOracle typeOracle) {
- List<JClassType> testWidgetTypes = new ArrayList<JClassType>();
+ List<JClassType> testWidgetTypes = new ArrayList<>();
JClassType[] widgetTypes = typeOracle.findType(Widget.class.getName())
.getSubtypes();
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java
index a654406f1e..dd144bdc58 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java
@@ -25,7 +25,7 @@ import com.vaadin.v7.ui.Grid;
public class GridCheckBoxDisplay extends AbstractTestUI {
private static final long serialVersionUID = -5575892909354637168L;
- private BeanItemContainer<Todo> todoContainer = new BeanItemContainer<Todo>(
+ private BeanItemContainer<Todo> todoContainer = new BeanItemContainer<>(
Todo.class);
@Override
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridColumnWidthRecalculation.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridColumnWidthRecalculation.java
index 7c0191d7c5..e50effb6a4 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridColumnWidthRecalculation.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridColumnWidthRecalculation.java
@@ -68,7 +68,7 @@ public class GridColumnWidthRecalculation extends AbstractTestUI {
Indexed dataSource = grid.getContainerDataSource();
Object itemId = dataSource.getItemIds().iterator().next();
Item item = dataSource.getItem(itemId);
- ArrayList<Object> pIds = new ArrayList<Object>(
+ ArrayList<Object> pIds = new ArrayList<>(
item.getItemPropertyIds());
for (int i = 0; i < pIds.size() / 2; i++) {
int j = pIds.size() - 1 - i;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDataSourceReset.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDataSourceReset.java
index 98c204de46..7df5fbd5d1 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDataSourceReset.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDataSourceReset.java
@@ -37,7 +37,7 @@ public class GridDataSourceReset extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
persons = createPersons(10, new Random(1));
- container = new BeanItemContainer<ComplexPerson>(ComplexPerson.class,
+ container = new BeanItemContainer<>(ComplexPerson.class,
persons);
grid = new Grid(container);
@@ -57,7 +57,7 @@ public class GridDataSourceReset extends AbstractTestUI {
}
public static List<ComplexPerson> createPersons(int count, Random r) {
- List<ComplexPerson> c = new ArrayList<ComplexPerson>();
+ List<ComplexPerson> c = new ArrayList<>();
for (int i = 0; i < count; ++i) {
c.add(ComplexPerson.create(r));
}
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDefaultSelectionMode.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDefaultSelectionMode.java
index c455932ceb..fc7dd7e791 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDefaultSelectionMode.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDefaultSelectionMode.java
@@ -38,11 +38,11 @@ public class GridDefaultSelectionMode extends AbstractTestUI {
person2.setFirstName("person");
person2.setLastName("two");
- ArrayList<Person> items = new ArrayList<Person>();
+ ArrayList<Person> items = new ArrayList<>();
items.add(person1);
items.add(person2);
- final BeanItemContainer<Person> container = new BeanItemContainer<Person>(
+ final BeanItemContainer<Person> container = new BeanItemContainer<>(
Person.class, items);
final Grid grid = new Grid();
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsDetach.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsDetach.java
index 888313e3b7..5568f6b97c 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsDetach.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsDetach.java
@@ -71,7 +71,7 @@ public class GridDetailsDetach extends AbstractTestUI {
}
private Grid generateGrid() {
- BeanItemContainer<GridExampleBean> container = new BeanItemContainer<GridExampleBean>(
+ BeanItemContainer<GridExampleBean> container = new BeanItemContainer<>(
GridExampleBean.class);
for (int i = 0; i < 1000; i++) {
container.addItem(new GridExampleBean("Bean " + i, i * i, i / 10d));
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFormatChange.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFormatChange.java
index 1277257686..b67164c1c4 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFormatChange.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFormatChange.java
@@ -97,7 +97,7 @@ public class GridHeaderFormatChange extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- BeanItemContainer<Person> datasource = new BeanItemContainer<Person>(
+ BeanItemContainer<Person> datasource = new BeanItemContainer<>(
Person.class);
final Grid grid;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeight.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeight.java
index b91324bf0c..13f52537e2 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeight.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeight.java
@@ -54,7 +54,7 @@ public class GridHeight extends AbstractTestUI {
static final String[] detailsRowHeights = { FULL, UNDEFINED, PX100 };
private Grid grid;
- private Map<Object, VerticalLayout> detailsLayouts = new HashMap<Object, VerticalLayout>();
+ private Map<Object, VerticalLayout> detailsLayouts = new HashMap<>();
private OptionGroup detailsHeightSelector;
@Override
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java
index 07a71f53e0..d31bca5901 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java
@@ -85,7 +85,7 @@ public class GridReplaceContainer extends AbstractTestUIWithLog {
}
private Indexed createContainer() {
- BeanItemContainer<Bean> bic = new BeanItemContainer<Bean>(Bean.class);
+ BeanItemContainer<Bean> bic = new BeanItemContainer<>(Bean.class);
bic.addBean(new Bean(1, "First item"));
bic.addBean(new Bean(2, "Second item"));
bic.addBean(new Bean(3, "Third item"));
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java
index bf17dc553e..87adb11bb4 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java
@@ -41,13 +41,13 @@ public class GridSortIndicator extends AbstractTestUI {
@Override
public void sort(SortEvent event) {
- List<SortOrder> currentSortOrder = new ArrayList<SortOrder>(
+ List<SortOrder> currentSortOrder = new ArrayList<>(
event.getSortOrder());
if (currentSortOrder.size() == 1) {
// If the name column was clicked, set a new sort order for
// both columns. Otherwise, revert to oldSortDirection if it
// is not null.
- List<SortOrder> newSortOrder = new ArrayList<SortOrder>();
+ List<SortOrder> newSortOrder = new ArrayList<>();
SortDirection newSortDirection = oldSortDirection;
if (currentSortOrder.get(0).getPropertyId()
.equals("Name")) {
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSubPixelProblemWrapping.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSubPixelProblemWrapping.java
index c37ffa86a4..9c9b49e3da 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSubPixelProblemWrapping.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSubPixelProblemWrapping.java
@@ -77,7 +77,7 @@ public class GridSubPixelProblemWrapping extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
addComponent(button);
- container = new BeanItemContainer<DataObject>(DataObject.class);
+ container = new BeanItemContainer<>(DataObject.class);
container.addBean(new DataObject("Foo", "Bar"));
Grid grid = new Grid(container);
grid.getColumn("foo").setWidth(248.525);
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 5c0df81c9c..cf31a5f3dd 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
@@ -120,7 +120,7 @@ public class GridThemeUI extends AbstractTestUIWithLog {
@Override
public void buttonClick(ClickEvent event) {
HeaderRow row = addHeaderRowAt(0);
- List<Object> pids = new ArrayList<Object>();
+ List<Object> pids = new ArrayList<>();
for (Column c : getColumns()) {
pids.add(c.getPropertyId());
}
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java
index 1e2fd09f2e..a534074da0 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java
@@ -228,7 +228,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
};
- private Map<Object, Panel> detailsMap = new HashMap<Object, Panel>();
+ private Map<Object, Panel> detailsMap = new HashMap<>();
private final DetailsGenerator persistingDetailsGenerator = new DetailsGenerator() {
@@ -474,7 +474,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
protected void createGridActions() {
- LinkedHashMap<String, String> primaryStyleNames = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> primaryStyleNames = new LinkedHashMap<>();
primaryStyleNames.put("v-grid", "v-grid");
primaryStyleNames.put("v-escalator", "v-escalator");
primaryStyleNames.put("my-grid", "my-grid");
@@ -489,7 +489,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
}, primaryStyleNames.get("v-grid"));
- LinkedHashMap<String, SelectionMode> selectionModes = new LinkedHashMap<String, Grid.SelectionMode>();
+ LinkedHashMap<String, SelectionMode> selectionModes = new LinkedHashMap<>();
selectionModes.put("single", SelectionMode.SINGLE);
selectionModes.put("multi", SelectionMode.MULTI);
selectionModes.put("none", SelectionMode.NONE);
@@ -511,7 +511,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
});
- LinkedHashMap<String, Integer> selectionLimits = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> selectionLimits = new LinkedHashMap<>();
selectionLimits.put("2", Integer.valueOf(2));
selectionLimits.put("1000", Integer.valueOf(1000));
selectionLimits.put("Integer.MAX_VALUE",
@@ -530,7 +530,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
});
- LinkedHashMap<String, List<SortOrder>> sortableProperties = new LinkedHashMap<String, List<SortOrder>>();
+ LinkedHashMap<String, List<SortOrder>> sortableProperties = new LinkedHashMap<>();
for (Object propertyId : ds.getSortableContainerPropertyIds()) {
sortableProperties.put(propertyId + ", ASC",
Sort.by(propertyId).build());
@@ -551,7 +551,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid c, Boolean value, Object data) {
- List<Object> ids = new ArrayList<Object>();
+ List<Object> ids = new ArrayList<>();
ids.addAll(ds.getContainerPropertyIds());
if (!value) {
c.setColumnOrder(ids.toArray());
@@ -565,8 +565,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
});
- LinkedHashMap<String, CellStyleGenerator> cellStyleGenerators = new LinkedHashMap<String, CellStyleGenerator>();
- LinkedHashMap<String, RowStyleGenerator> rowStyleGenerators = new LinkedHashMap<String, RowStyleGenerator>();
+ LinkedHashMap<String, CellStyleGenerator> cellStyleGenerators = new LinkedHashMap<>();
+ LinkedHashMap<String, RowStyleGenerator> rowStyleGenerators = new LinkedHashMap<>();
rowStyleGenerators.put(ROW_STYLE_GENERATOR_NONE, null);
rowStyleGenerators.put(ROW_STYLE_GENERATOR_ROW_NUMBERS,
new RowStyleGenerator() {
@@ -684,7 +684,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
});
- LinkedHashMap<String, Integer> frozenOptions = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> frozenOptions = new LinkedHashMap<>();
for (int i = -1; i <= COLUMNS; i++) {
frozenOptions.put(String.valueOf(i), Integer.valueOf(i));
}
@@ -701,7 +701,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
});
- LinkedHashMap<String, Integer> containerDelayValues = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> containerDelayValues = new LinkedHashMap<>();
for (int delay : new int[] { 0, 500, 2000, 10000 }) {
containerDelayValues.put(String.valueOf(delay),
Integer.valueOf(delay));
@@ -845,7 +845,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
});
- LinkedHashMap<String, String> defaultRows = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> defaultRows = new LinkedHashMap<>();
defaultRows.put("Top", "Top");
defaultRows.put("Bottom", "Bottom");
defaultRows.put("Unset", "Unset");
@@ -997,7 +997,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
final String columnProperty = getColumnProperty(
(Integer) data);
List<Column> cols = grid.getColumns();
- List<Object> reordered = new ArrayList<Object>();
+ List<Object> reordered = new ArrayList<>();
boolean addAsLast = false;
for (int i = 0; i < cols.size(); i++) {
Column col = cols.get(i);
@@ -1131,7 +1131,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}, w, c);
}
- LinkedHashMap<String, GridStaticCellType> defaultRows = new LinkedHashMap<String, GridStaticCellType>();
+ LinkedHashMap<String, GridStaticCellType> defaultRows = new LinkedHashMap<>();
defaultRows.put("Text Header", GridStaticCellType.TEXT);
defaultRows.put("Html Header ", GridStaticCellType.HTML);
defaultRows.put("Widget Header", GridStaticCellType.WIDGET);
@@ -1170,7 +1170,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}, c);
- defaultRows = new LinkedHashMap<String, GridStaticCellType>();
+ defaultRows = new LinkedHashMap<>();
defaultRows.put("Text Footer", GridStaticCellType.TEXT);
defaultRows.put("Html Footer", GridStaticCellType.HTML);
defaultRows.put("Widget Footer", GridStaticCellType.WIDGET);
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/AbstractTextFieldTest.java b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/AbstractTextFieldTest.java
index 604eb707ee..5e27b591b4 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/AbstractTextFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/AbstractTextFieldTest.java
@@ -128,7 +128,7 @@ public abstract class AbstractTextFieldTest<T extends AbstractTextField>
}
private void createNullRepresentationAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("null", "null");
options.put("This is empty", "This is empty");
@@ -169,7 +169,7 @@ public abstract class AbstractTextFieldTest<T extends AbstractTextField>
}
private void createSelectionRangeAction(String category) {
- List<Range> options = new ArrayList<Range>();
+ List<Range> options = new ArrayList<>();
options.add(new Range(0, 10));
options.add(new Range(0, 1));
options.add(new Range(0, 2));
@@ -198,7 +198,7 @@ public abstract class AbstractTextFieldTest<T extends AbstractTextField>
}
private void createTextChangeEventTimeoutAction(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<>();
options.put("0", 0);
options.put("100ms", 100);
options.put("500ms", 500);
@@ -211,7 +211,7 @@ public abstract class AbstractTextFieldTest<T extends AbstractTextField>
}
private void createTextChangeEventModeAction(String category) {
- LinkedHashMap<String, TextChangeEventMode> options = new LinkedHashMap<String, AbstractTextField.TextChangeEventMode>();
+ LinkedHashMap<String, TextChangeEventMode> options = new LinkedHashMap<>();
for (TextChangeEventMode m : TextChangeEventMode.values()) {
options.put(m.toString(), m);
}
@@ -234,7 +234,7 @@ public abstract class AbstractTextFieldTest<T extends AbstractTextField>
}
private void createInputPromptAction(String category) {
- LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> options = new LinkedHashMap<>();
options.put("-", null);
options.put("Enter a value", "Enter a value");
options.put("- Click here -", "- Click here -");
diff --git a/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java b/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java
index 6de1d16d41..d2cc9450f2 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java
@@ -31,7 +31,7 @@ public class DeploymentConfigurationTest extends SingleBrowserTest {
@Test
public void testParameters() {
openTestURL();
- List<String> texts = new ArrayList<String>(Arrays.asList(
+ List<String> texts = new ArrayList<>(Arrays.asList(
"Init parameters:", "widgetset: com.vaadin.v7.Vaadin7WidgetSet",
"closeIdleSessions: true", "productionMode: false",
"testParam: 42", "heartbeatInterval: 301",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java
index 060a6a2a7d..137216d718 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java
@@ -59,7 +59,7 @@ public class ComboBoxSuggestionPageLengthTest extends MultiBrowserTest {
.findElements(By.cssSelector(
".v-filterselect-suggestpopup .gwt-MenuItem span"));
- List<String> suggestions = new ArrayList<String>();
+ List<String> suggestions = new ArrayList<>();
for (WebElement suggestion : suggestionElements) {
suggestions.add(suggestion.getText());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java
index ca87aaa379..d804f8f8ce 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java
@@ -69,7 +69,7 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
List<WebElement> headerElements = popup
.findElement(By.className("v-datefield-calendarpanel-weekdays"))
.findElements(By.tagName("td"));
- List<WebElement> weekdays = new ArrayList<WebElement>();
+ List<WebElement> weekdays = new ArrayList<>();
for (WebElement headerElement : headerElements) {
if ("columnheader".equals(headerElement.getAttribute("role"))) {
weekdays.add(headerElement);
@@ -176,7 +176,7 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
List<WebElement> headerElements = popup
.findElement(By.className("v-datefield-calendarpanel-weekdays"))
.findElements(By.tagName("td"));
- List<WebElement> weekdays = new ArrayList<WebElement>();
+ List<WebElement> weekdays = new ArrayList<>();
for (WebElement headerElement : headerElements) {
if ("columnheader".equals(headerElement.getAttribute("role"))) {
weekdays.add(headerElement);
@@ -303,7 +303,7 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
List<WebElement> headerElements = popup
.findElement(By.className("v-datefield-calendarpanel-weekdays"))
.findElements(By.tagName("td"));
- List<WebElement> weekdays = new ArrayList<WebElement>();
+ List<WebElement> weekdays = new ArrayList<>();
for (WebElement headerElement : headerElements) {
if ("columnheader".equals(headerElement.getAttribute("role"))) {
weekdays.add(headerElement);
diff --git a/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java b/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java
index cc27555638..b48f252d27 100644
--- a/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java
@@ -26,7 +26,7 @@ public class TableQueryWithNonUniqueFirstPrimaryKeyTest
$(ComboBoxElement.class).first().findElement(By.vaadin("#textbox"))
.sendKeys("rus", Keys.ENTER);
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
// pick list items that are shown in suggestion popup
List<WebElement> elems = findElements(
diff --git a/uitest/src/test/java/com/vaadin/tests/fields/TabIndexesTest.java b/uitest/src/test/java/com/vaadin/tests/fields/TabIndexesTest.java
index 6bd456c7e2..a642a1207a 100644
--- a/uitest/src/test/java/com/vaadin/tests/fields/TabIndexesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fields/TabIndexesTest.java
@@ -73,7 +73,7 @@ public class TabIndexesTest extends MultiBrowserTest {
}
private List<WebElement> getFieldElements() {
- List<WebElement> fieldElements = new ArrayList<WebElement>();
+ List<WebElement> fieldElements = new ArrayList<>();
fieldElements.add(getElement1());
fieldElements.add(getElement2());
fieldElements.add(getElement3());
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
index 33841a13ea..b17febee04 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
@@ -59,7 +59,7 @@ public abstract class AbstractServletIntegrationTest
@Parameters
public static Collection<String> getContextPaths() {
if (getServerName().equals("wildfly9-nginx")) {
- ArrayList<String> paths = new ArrayList<String>();
+ ArrayList<String> paths = new ArrayList<>();
paths.add("/buffering/demo");
paths.add("/nonbuffering/demo");
paths.add("/buffering-timeout/demo");
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java
index e7cb461b1c..d135c79347 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java
@@ -57,8 +57,8 @@ public class JSPIntegrationTest extends PrivateTB3Configuration {
// Should now have two services with 2 + 1 UIs
List<UIData> threeUIs = getUIs();
assertEquals(3, threeUIs.size());
- Set<String> serviceNames = new HashSet<String>();
- Set<Integer> uiIds = new HashSet<Integer>();
+ Set<String> serviceNames = new HashSet<>();
+ Set<Integer> uiIds = new HashSet<>();
for (UIData uiData : threeUIs) {
serviceNames.add(uiData.serviceName);
uiIds.add(uiData.uiId);
@@ -76,7 +76,7 @@ public class JSPIntegrationTest extends PrivateTB3Configuration {
}
private List<UIData> getUIs() {
- List<UIData> uis = new ArrayList<UIData>();
+ List<UIData> uis = new ArrayList<>();
getDriver().get(jspUrl);
List<WebElement> rows = getDriver()
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java b/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
index bb29a82d2d..391618bf43 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
@@ -49,7 +49,7 @@ public class AffectedTB3TestLocator extends TB3TestLocator {
testClasses
.addAll(getTestClassesWithAffectedPackageName(allTestClasses));
- List<Class<? extends T>> affectedTestClasses = new ArrayList<Class<? extends T>>();
+ List<Class<? extends T>> affectedTestClasses = new ArrayList<>();
affectedTestClasses.addAll(testClasses);
return affectedTestClasses;
@@ -57,7 +57,7 @@ public class AffectedTB3TestLocator extends TB3TestLocator {
private <T> List<Class<? extends T>> getTestClassesWithAffectedPackageName(
List<Class<? extends T>> classes) {
- List<Class<? extends T>> affectedTestClasses = new ArrayList<Class<? extends T>>();
+ List<Class<? extends T>> affectedTestClasses = new ArrayList<>();
List<String> affectedFiles = getAffectedFiles();
for (Class c : classes) {
@@ -79,7 +79,7 @@ public class AffectedTB3TestLocator extends TB3TestLocator {
}
private List<String> getAffectedFiles() {
- List<String> affectedFilePaths = new ArrayList<String>();
+ List<String> affectedFilePaths = new ArrayList<>();
for (String path : changedTB3TestLocator.getChangedFilePaths()) {
if (!path.toLowerCase().contains("test")) {
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java b/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
index 44ec4ca129..9de53a3c28 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
@@ -54,7 +54,7 @@ public class ChangedTB3TestLocator extends TB3TestLocator {
}
protected List<String> getChangedFilePaths() {
- List<String> filePaths = new ArrayList<String>();
+ List<String> filePaths = new ArrayList<>();
for (DiffEntry diff : getDiffs()) {
if (diff.getChangeType() != ChangeType.DELETE) {
@@ -100,7 +100,7 @@ public class ChangedTB3TestLocator extends TB3TestLocator {
Git git = new Git(repository);
DiffCommand diffCommand = git.diff();
- List<DiffEntry> diffsInWorkingTree = new ArrayList<DiffEntry>();
+ List<DiffEntry> diffsInWorkingTree = new ArrayList<>();
for (DiffEntry diff : diffCommand.call()) {
if (pathIsExcluded(diff.getNewPath())) {
@@ -143,7 +143,7 @@ public class ChangedTB3TestLocator extends TB3TestLocator {
private <T> List<Class<? extends T>> getChangedTestClasses(
Class<T> baseClass) {
List<String> changedTestFilePaths = getTestFilePaths();
- List<Class<? extends T>> testClasses = new ArrayList<Class<? extends T>>();
+ List<Class<? extends T>> testClasses = new ArrayList<>();
for (String filePath : changedTestFilePaths) {
String path = filePath.replace("uitest/src/", "").replace(".java",
@@ -156,7 +156,7 @@ public class ChangedTB3TestLocator extends TB3TestLocator {
}
private List<String> getTestFilePaths() {
- List<String> changedTestFilePaths = new ArrayList<String>();
+ List<String> changedTestFilePaths = new ArrayList<>();
for (String filePath : getChangedFilePaths()) {
if (filePath.toLowerCase().startsWith("uitest")
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java
index 5b218e3f98..261af495fa 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java
@@ -50,7 +50,7 @@ public abstract class MultiBrowserThemeTest extends MultiBrowserTest {
@Override
protected void openTestURL(Class<?> uiClass, String... parameters) {
- Set<String> params = new HashSet<String>(Arrays.asList(parameters));
+ Set<String> params = new HashSet<>(Arrays.asList(parameters));
params.add("theme=" + theme);
super.openTestURL(uiClass, params.toArray(new String[params.size()]));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java
index 1ceed606cd..7d798fa2e8 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java
@@ -48,7 +48,7 @@ public abstract class MultiBrowserThemeTestWithProxy
@Override
protected void openTestURL(Class<?> uiClass, String... parameters) {
- Set<String> params = new HashSet<String>(Arrays.asList(parameters));
+ Set<String> params = new HashSet<>(Arrays.asList(parameters));
params.add("theme=" + theme);
super.openTestURL(uiClass, params.toArray(new String[params.size()]));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java b/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
index bf0387d468..9698068621 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
@@ -32,8 +32,8 @@ import com.vaadin.tests.tb3.ServletIntegrationTests.ServletIntegrationTestSuite;
@RunWith(ServletIntegrationTestSuite.class)
public class ServletIntegrationTests {
- public static Set<String> notJSR356Compatible = new HashSet<String>();
- public static Set<String> notWebsocketCompatible = new HashSet<String>();
+ public static Set<String> notJSR356Compatible = new HashSet<>();
+ public static Set<String> notWebsocketCompatible = new HashSet<>();
static {
notJSR356Compatible.add("jetty8");
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 c2b5c3f1cb..de8e4ea9c4 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
@@ -78,7 +78,7 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
}
public static Collection<Param> parameters() {
- List<Param> data = new ArrayList<Param>();
+ List<Param> data = new ArrayList<>();
int[] params = new int[] { 0, 500, 999 };
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java
index 776cbfb57d..15c8498676 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java
@@ -67,7 +67,7 @@ public class GridHeightTest extends MultiBrowserTest {
private Map<AssertionError, Object[]> testGridHeightAndResizing(
Object gridHeight) throws InterruptedException {
- Map<AssertionError, Object[]> errors = new HashMap<AssertionError, Object[]>();
+ Map<AssertionError, Object[]> errors = new HashMap<>();
String caption;
if (GridHeight.ROW3.equals(gridHeight)) {
caption = gridHeight + " rows";
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java
index 7a0c80f11a..5787c2facc 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java
@@ -72,7 +72,7 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
}
protected List<TestBenchElement> getGridHeaderRowCells() {
- List<TestBenchElement> headerCells = new ArrayList<TestBenchElement>();
+ List<TestBenchElement> headerCells = new ArrayList<>();
for (int i = 0; i < getGridElement().getHeaderCount(); ++i) {
headerCells.addAll(getGridElement().getHeaderCells(i));
}
@@ -80,7 +80,7 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
}
protected List<TestBenchElement> getGridFooterRowCells() {
- List<TestBenchElement> footerCells = new ArrayList<TestBenchElement>();
+ List<TestBenchElement> footerCells = new ArrayList<>();
for (int i = 0; i < getGridElement().getFooterCount(); ++i) {
footerCells.addAll(getGridElement().getFooterCells(i));
}
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java
index 5413e7a0b1..a0ca714824 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java
@@ -154,7 +154,7 @@ public class GridClientColumnPropertiesTest
GridElement gridElement = getGridElement();
List<GridCellElement> headerCells = gridElement.getHeaderCells(0);
- final List<Integer> columnWidths = new ArrayList<Integer>();
+ final List<Integer> columnWidths = new ArrayList<>();
for (GridCellElement cell : headerCells) {
columnWidths.add(cell.getSize().getWidth());
}