]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use diamond operator where it can be used
authorArtur Signell <artur@vaadin.com>
Mon, 5 Sep 2016 09:33:39 +0000 (12:33 +0300)
committerJohannes Dahlström <johannesd@vaadin.com>
Mon, 5 Sep 2016 10:02:48 +0000 (10:02 +0000)
Does not modify compatibility packages to keep to closer to Vaadin 7.7

Change-Id: Ic9c4944eb90218290545a04ecd7455eb63910012

456 files changed:
all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java
all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java
client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java
client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java
client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java
client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java
client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
client/src/main/java/com/vaadin/client/ApplicationConnection.java
client/src/main/java/com/vaadin/client/ComponentDetail.java
client/src/main/java/com/vaadin/client/ComponentDetailMap.java
client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java
client/src/main/java/com/vaadin/client/ConnectorMap.java
client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java
client/src/main/java/com/vaadin/client/LayoutManager.java
client/src/main/java/com/vaadin/client/LocaleService.java
client/src/main/java/com/vaadin/client/Profiler.java
client/src/main/java/com/vaadin/client/ResourceLoader.java
client/src/main/java/com/vaadin/client/UIDL.java
client/src/main/java/com/vaadin/client/Util.java
client/src/main/java/com/vaadin/client/ValueMap.java
client/src/main/java/com/vaadin/client/WidgetMap.java
client/src/main/java/com/vaadin/client/WidgetUtil.java
client/src/main/java/com/vaadin/client/communication/JsonDecoder.java
client/src/main/java/com/vaadin/client/communication/MessageHandler.java
client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java
client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java
client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java
client/src/main/java/com/vaadin/client/componentlocator/SelectorPredicate.java
client/src/main/java/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java
client/src/main/java/com/vaadin/client/connectors/data/DataCommunicatorConnector.java
client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java
client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java
client/src/main/java/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java
client/src/main/java/com/vaadin/client/debug/internal/ConnectorInfoPanel.java
client/src/main/java/com/vaadin/client/debug/internal/HierarchyPanel.java
client/src/main/java/com/vaadin/client/debug/internal/Highlight.java
client/src/main/java/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java
client/src/main/java/com/vaadin/client/debug/internal/SelectorPath.java
client/src/main/java/com/vaadin/client/debug/internal/TestBenchSection.java
client/src/main/java/com/vaadin/client/debug/internal/VDebugWindow.java
client/src/main/java/com/vaadin/client/event/InputEvent.java
client/src/main/java/com/vaadin/client/event/PointerCancelEvent.java
client/src/main/java/com/vaadin/client/event/PointerDownEvent.java
client/src/main/java/com/vaadin/client/event/PointerMoveEvent.java
client/src/main/java/com/vaadin/client/event/PointerUpEvent.java
client/src/main/java/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java
client/src/main/java/com/vaadin/client/metadata/AsyncBundleLoader.java
client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java
client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java
client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java
client/src/main/java/com/vaadin/client/ui/AbstractConnector.java
client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java
client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java
client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java
client/src/main/java/com/vaadin/client/ui/VAccordion.java
client/src/main/java/com/vaadin/client/ui/VCustomLayout.java
client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java
client/src/main/java/com/vaadin/client/ui/VEmbedded.java
client/src/main/java/com/vaadin/client/ui/VFlash.java
client/src/main/java/com/vaadin/client/ui/VFormLayout.java
client/src/main/java/com/vaadin/client/ui/VGridLayout.java
client/src/main/java/com/vaadin/client/ui/VMenuBar.java
client/src/main/java/com/vaadin/client/ui/VNotification.java
client/src/main/java/com/vaadin/client/ui/VPopupView.java
client/src/main/java/com/vaadin/client/ui/VTabsheetBase.java
client/src/main/java/com/vaadin/client/ui/VWindow.java
client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java
client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java
client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java
client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
client/src/main/java/com/vaadin/client/ui/formlayout/FormLayoutConnector.java
client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java
client/src/main/java/com/vaadin/client/ui/menubar/MenuBar.java
client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java
client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java
client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java
client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java
client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java
client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
client/src/main/java/com/vaadin/client/ui/window/WindowMoveEvent.java
client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java
client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeEvent.java
client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedEvent.java
client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java
client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java
client/src/main/java/com/vaadin/client/widget/grid/datasources/ListDataSource.java
client/src/main/java/com/vaadin/client/widget/grid/datasources/ListSorter.java
client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java
client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java
client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java
client/src/main/java/com/vaadin/client/widget/grid/events/GridEnabledEvent.java
client/src/main/java/com/vaadin/client/widget/grid/events/ScrollEvent.java
client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllEvent.java
client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java
client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionEvent.java
client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelMulti.java
client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelSingle.java
client/src/main/java/com/vaadin/client/widget/grid/sort/Sort.java
client/src/main/java/com/vaadin/client/widget/grid/sort/SortEvent.java
client/src/main/java/com/vaadin/client/widgets/Escalator.java
client/src/main/java/com/vaadin/client/widgets/Grid.java
client/src/main/java/com/vaadin/client/widgets/Overlay.java
client/src/test/java/com/vaadin/client/DateTimeServiceTest.java
client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java
server/src/main/java/com/vaadin/data/Result.java
server/src/main/java/com/vaadin/data/sort/Sort.java
server/src/main/java/com/vaadin/event/ActionManager.java
server/src/main/java/com/vaadin/event/EventRouter.java
server/src/main/java/com/vaadin/event/SelectionEvent.java
server/src/main/java/com/vaadin/event/TransferableImpl.java
server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java
server/src/main/java/com/vaadin/navigator/Navigator.java
server/src/main/java/com/vaadin/server/AbstractClientConnector.java
server/src/main/java/com/vaadin/server/AbstractErrorMessage.java
server/src/main/java/com/vaadin/server/BootstrapHandler.java
server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
server/src/main/java/com/vaadin/server/DownloadStream.java
server/src/main/java/com/vaadin/server/GAEVaadinServlet.java
server/src/main/java/com/vaadin/server/GlobalResourceHandler.java
server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java
server/src/main/java/com/vaadin/server/JsonCodec.java
server/src/main/java/com/vaadin/server/JsonPaintTarget.java
server/src/main/java/com/vaadin/server/KeyMapper.java
server/src/main/java/com/vaadin/server/LegacyApplication.java
server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java
server/src/main/java/com/vaadin/server/Page.java
server/src/main/java/com/vaadin/server/ServerRpcManager.java
server/src/main/java/com/vaadin/server/ServerRpcMethodInvocation.java
server/src/main/java/com/vaadin/server/VaadinPortletSession.java
server/src/main/java/com/vaadin/server/VaadinService.java
server/src/main/java/com/vaadin/server/VaadinServlet.java
server/src/main/java/com/vaadin/server/VaadinSession.java
server/src/main/java/com/vaadin/server/WrappedHttpSession.java
server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java
server/src/main/java/com/vaadin/server/communication/LegacyUidlWriter.java
server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java
server/src/main/java/com/vaadin/server/communication/SessionRequestHandler.java
server/src/main/java/com/vaadin/server/communication/SharedStateWriter.java
server/src/main/java/com/vaadin/server/communication/UidlWriter.java
server/src/main/java/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java
server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java
server/src/main/java/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java
server/src/main/java/com/vaadin/ui/AbsoluteLayout.java
server/src/main/java/com/vaadin/ui/AbstractComponent.java
server/src/main/java/com/vaadin/ui/AbstractComponentContainer.java
server/src/main/java/com/vaadin/ui/AbstractMedia.java
server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java
server/src/main/java/com/vaadin/ui/ConnectorTracker.java
server/src/main/java/com/vaadin/ui/CssLayout.java
server/src/main/java/com/vaadin/ui/CustomLayout.java
server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
server/src/main/java/com/vaadin/ui/Embedded.java
server/src/main/java/com/vaadin/ui/Flash.java
server/src/main/java/com/vaadin/ui/GridLayout.java
server/src/main/java/com/vaadin/ui/JavaScript.java
server/src/main/java/com/vaadin/ui/LoginForm.java
server/src/main/java/com/vaadin/ui/MenuBar.java
server/src/main/java/com/vaadin/ui/TabSheet.java
server/src/main/java/com/vaadin/ui/UI.java
server/src/main/java/com/vaadin/ui/Upload.java
server/src/main/java/com/vaadin/ui/Window.java
server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
server/src/main/java/com/vaadin/ui/declarative/DesignContext.java
server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java
server/src/main/java/com/vaadin/ui/declarative/FieldBinder.java
server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java
server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java
server/src/main/java/com/vaadin/ui/declarative/converters/ShortcutKeyMapper.java
server/src/main/java/com/vaadin/util/ConnectorHelper.java
server/src/main/java/com/vaadin/util/CurrentInstance.java
server/src/main/java/com/vaadin/util/FileTypeResolver.java
server/src/test/java/com/vaadin/data/ResultTest.java
server/src/test/java/com/vaadin/server/DragAndDropServiceTest.java
server/src/test/java/com/vaadin/server/JSONSerializerTest.java
server/src/test/java/com/vaadin/server/MockVaadinSession.java
server/src/test/java/com/vaadin/server/data/datasource/StrBean.java
server/src/test/java/com/vaadin/tests/VaadinClasses.java
server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java
server/src/test/java/com/vaadin/tests/design/ComponentMapperTest.java
server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java
server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java
server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
server/src/test/java/com/vaadin/tests/design/DesignReadInConstructorTest.java
server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java
server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java
server/src/test/java/com/vaadin/tests/server/KeyMapperTest.java
server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
server/src/test/java/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
server/src/test/java/com/vaadin/tests/server/component/FinalMethodTest.java
server/src/test/java/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java
server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutTest.java
server/src/test/java/com/vaadin/tests/server/component/datefield/ResolutionTest.java
server/src/test/java/com/vaadin/tests/server/component/menubar/MenuBarIdsTest.java
server/src/test/java/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
server/src/test/java/com/vaadin/tests/server/components/WindowTest.java
server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java
server/src/test/java/com/vaadin/tests/util/MockDeploymentConfiguration.java
server/src/test/java/com/vaadin/util/CurrentInstanceTest.java
shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java
shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java
shared/src/main/java/com/vaadin/shared/communication/SharedState.java
shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java
shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java
shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java
shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java
shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java
shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java
shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java
shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java
shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java
shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutState.java
shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java
shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java
shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java
uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
uitest-common/src/main/java/com/vaadin/tests/tb3/MultiBrowserTest.java
uitest-common/src/main/java/com/vaadin/tests/tb3/ParallelScheduler.java
uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java
uitest-common/src/main/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java
uitest-common/src/main/java/com/vaadin/tests/tb3/TB3TestLocator.java
uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java
uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java
uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java
uitest/src/main/java/com/vaadin/tests/Components.java
uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
uitest/src/main/java/com/vaadin/tests/TestBench.java
uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
uitest/src/main/java/com/vaadin/tests/TestMethodProperty.java
uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
uitest/src/main/java/com/vaadin/tests/VaadinClasses.java
uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java
uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java
uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java
uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java
uitest/src/main/java/com/vaadin/tests/components/HierarchicalContainerSorting.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBasedOnLong.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerDoubleFieldsWithDataSource.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java
uitest/src/main/java/com/vaadin/tests/components/abstractfield/TextFieldConversions.java
uitest/src/main/java/com/vaadin/tests/components/accordion/RemoveTabs.java
uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerGenerator.java
uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/TestBeanItemContainerUsage.java
uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java
uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java
uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java
uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java
uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java
uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java
uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java
uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxes2.java
uitest/src/main/java/com/vaadin/tests/components/combobox/ComboFocusBlurEvents.java
uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java
uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java
uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java
uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java
uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTimezone.java
uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java
uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldTest.java
uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyPopupDateFieldTest.java
uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTest.java
uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java
uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java
uitest/src/main/java/com/vaadin/tests/components/datefield/ValueThroughProperty.java
uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java
uitest/src/main/java/com/vaadin/tests/components/label/LabelPropertySourceValue.java
uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java
uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java
uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectJump.java
uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java
uitest/src/main/java/com/vaadin/tests/components/menubar/Menubars.java
uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java
uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java
uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java
uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java
uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewOffScreen.java
uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarGenericTest.java
uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java
uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaTest.java
uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java
uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
uitest/src/main/java/com/vaadin/tests/components/slider/SliderTest.java
uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java
uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java
uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java
uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java
uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java
uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java
uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java
uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java
uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java
uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java
uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java
uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
uitest/src/main/java/com/vaadin/tests/components/table/NotselectablePaintSelections.java
uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java
uitest/src/main/java/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java
uitest/src/main/java/com/vaadin/tests/components/table/SetDataSourceWithPropertyIds.java
uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java
uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java
uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java
uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java
uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java
uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java
uitest/src/main/java/com/vaadin/tests/components/table/TableSortingStopsWorkingOnChrome.java
uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java
uitest/src/main/java/com/vaadin/tests/components/table/Tables.java
uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java
uitest/src/main/java/com/vaadin/tests/components/tabsheet/RemoveTabs.java
uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationWaiAria.java
uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java
uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java
uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithProperty.java
uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java
uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java
uitest/src/main/java/com/vaadin/tests/components/treetable/RowHeightWithoutRows.java
uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java
uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapper.java
uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java
uitest/src/main/java/com/vaadin/tests/components/twincolselect/TwinColSelects.java
uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java
uitest/src/main/java/com/vaadin/tests/components/ui/UIsInMultipleTabs.java
uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java
uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java
uitest/src/main/java/com/vaadin/tests/components/upload/TestUpload.java
uitest/src/main/java/com/vaadin/tests/components/upload/TestUploadAndDisableOnSuccess.java
uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
uitest/src/main/java/com/vaadin/tests/components/window/SubWindowOrder.java
uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java
uitest/src/main/java/com/vaadin/tests/components/window/WindowZIndex.java
uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java
uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java
uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java
uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java
uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java
uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java
uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java
uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java
uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java
uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java
uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java
uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotState.java
uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/SettingsView.java
uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java
uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java
uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java
uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java
uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java
uitest/src/main/java/com/vaadin/tests/util/Log.java
uitest/src/main/java/com/vaadin/tests/util/Millionaire.java
uitest/src/main/java/com/vaadin/tests/util/Role.java
uitest/src/main/java/com/vaadin/tests/util/TestClickListener.java
uitest/src/main/java/com/vaadin/tests/util/User.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/EscalatorBasicClientFeaturesWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridCellFocusOnResetSizeWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientDataSourcesWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridColumnAutoWidthClientWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDataChangeHandlerWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridDefaultTextRendererWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridHeightByRowOnInitWidget.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/MySelectionModelConnector.java
uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/PureGWTTestApplication.java
uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridColumnWidthRecalculation.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDataSourceReset.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDefaultSelectionMode.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsDetach.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFormatChange.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeight.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSubPixelProblemWrapping.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeUI.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java
uitest/src/main/java/com/vaadin/v7/tests/components/textfield/AbstractTextFieldTest.java
uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java
uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java
uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java
uitest/src/test/java/com/vaadin/tests/fields/TabIndexesTest.java
uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java
uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java
uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java
uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridDetailsLocationTest.java
uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java
uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java
uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java

index 5d92b499fe600ec57d263e57cd33985067d0e90e..72c10e892f59352dea2a20159380e7172e9910ef 100644 (file)
@@ -56,7 +56,7 @@ public class FetchReleaseNotesAuthors {
                 new InputStreamReader(p.getInputStream()));
         String line = "";
 
-        List<String> authors = new ArrayList<String>();
+        List<String> authors = new ArrayList<>();
         while ((line = b.readLine()) != null) {
             String author = line;
             if (authorMap.containsKey(author)) {
index 9f51bbf47f65f062438156fbc223a92f19683ced..7865770be8e4ba57b753a798d60d225763ab6464 100644 (file)
@@ -39,7 +39,7 @@ public class FetchReleaseNotesTickets {
         }
         String milestone = "";
 
-        List<String> versions = new ArrayList<String>();
+        List<String> versions = new ArrayList<>();
         for (String version : versionsProperty.split(" ")) {
             if (version.endsWith(".0") || version.matches(".*\\.rc\\d+")) {
                 // Find all prerelease versions for final or rc
@@ -63,7 +63,7 @@ public class FetchReleaseNotesTickets {
     }
 
     private static List<String> findPrereleaseVersions(String baseVersion) {
-        List<String> versions = new ArrayList<String>();
+        List<String> versions = new ArrayList<>();
 
         for (int i = 0; i < 50; i++) {
             versions.add(baseVersion + ".alpha" + i);
index 0db7609f696f9bfe881d16adb2059a9ac79b3190..9717c353531e64469e913136b52f073c496c828a 100644 (file)
@@ -62,7 +62,7 @@ public class GeneratePackageExports {
         }
 
         // Accepted packages
-        List<String> acceptedPackagePrefixes = new ArrayList<String>();
+        List<String> acceptedPackagePrefixes = new ArrayList<>();
         for (int i = 1; i < args.length; i++) {
             acceptedPackagePrefixes.add(args[i]);
         }
@@ -179,7 +179,7 @@ public class GeneratePackageExports {
     private static HashSet<String> getPackages(JarFile jar,
             List<String> acceptedPackagePrefixes,
             boolean includeNumberPackages) {
-        HashSet<String> packages = new HashSet<String>();
+        HashSet<String> packages = new HashSet<>();
 
         Pattern startsWithNumber = Pattern.compile("\\.\\d");
 
index df87cbcba1f3e2a1e289a61e1f1eccf3412a3da3..e411b27d003d1a529addb94c88e638b9005bec19 100644 (file)
@@ -63,7 +63,7 @@ public class SassLinker extends AbstractLinker {
             ArtifactSet toReturn = new ArtifactSet(artifacts);
 
             // The temporary scss files provided from the artefacts
-            List<FileInfo> scssFiles = new ArrayList<FileInfo>();
+            List<FileInfo> scssFiles = new ArrayList<>();
 
             // The public files are provided as inputstream, but the compiler
             // needs real files, as they can contain references to other
index 50b9bf4b0565c8eb60dcda7115a0cb9a0c912c66..7e8da70ac8d8fd9107af4ac2aa826d8e52b761af 100644 (file)
@@ -100,7 +100,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
             this.target = target;
             this.baseName = baseName;
             this.splitSize = splitSize;
-            methodNames = new ArrayList<String>();
+            methodNames = new ArrayList<>();
             methodNames.add(baseName);
         }
 
@@ -421,13 +421,13 @@ public class ConnectorBundleLoaderFactory extends Generator {
 
     private void detectBadProperties(ConnectorBundle bundle, TreeLogger logger)
             throws UnableToCompleteException {
-        Map<JClassType, Set<String>> definedProperties = new HashMap<JClassType, Set<String>>();
+        Map<JClassType, Set<String>> definedProperties = new HashMap<>();
 
         for (Property property : bundle.getNeedsProperty()) {
             JClassType beanType = property.getBeanType();
             Set<String> usedPropertyNames = definedProperties.get(beanType);
             if (usedPropertyNames == null) {
-                usedPropertyNames = new HashSet<String>();
+                usedPropertyNames = new HashSet<>();
                 definedProperties.put(beanType, usedPropertyNames);
             }
 
@@ -532,7 +532,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
                             + connector.getName());
 
             // Build map to speed up error checking
-            HashMap<String, Property> stateProperties = new HashMap<String, Property>();
+            HashMap<String, Property> stateProperties = new HashMap<>();
             JClassType stateType = ConnectorBundle
                     .findInheritedMethod(connector, "getState").getReturnType()
                     .isClassOrInterface();
@@ -603,7 +603,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
 
     private void writeSuperClasses(SplittingSourceWriter w,
             ConnectorBundle bundle) {
-        List<JClassType> needsSuperclass = new ArrayList<JClassType>(
+        List<JClassType> needsSuperclass = new ArrayList<>(
                 bundle.getNeedsSuperclass());
         // Emit in hierarchy order to ensure superclass is defined when
         // referenced
@@ -1092,7 +1092,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
             TypeOracle typeOracle)
             throws NotFoundException, UnableToCompleteException {
 
-        Map<LoadStyle, Collection<JClassType>> connectorsByLoadStyle = new HashMap<LoadStyle, Collection<JClassType>>();
+        Map<LoadStyle, Collection<JClassType>> connectorsByLoadStyle = new HashMap<>();
         for (LoadStyle loadStyle : LoadStyle.values()) {
             connectorsByLoadStyle.put(loadStyle, new ArrayList<JClassType>());
         }
@@ -1109,7 +1109,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
             }
         }
 
-        List<ConnectorBundle> bundles = new ArrayList<ConnectorBundle>();
+        List<ConnectorBundle> bundles = new ArrayList<>();
 
         Collection<TypeVisitor> visitors = getVisitors(typeOracle);
 
@@ -1187,10 +1187,10 @@ public class ConnectorBundleLoaderFactory extends Generator {
 
         JClassType[] types = serverConnectorType.getSubtypes();
 
-        Map<String, JClassType> mappings = new TreeMap<String, JClassType>();
+        Map<String, JClassType> mappings = new TreeMap<>();
 
         // Keep track of what has happened to avoid logging intermediate state
-        Map<JClassType, List<JClassType>> replaced = new TreeMap<JClassType, List<JClassType>>(
+        Map<JClassType, List<JClassType>> replaced = new TreeMap<>(
                 ConnectorBundle.jClassComparator);
 
         for (JClassType type : types) {
@@ -1229,7 +1229,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
                 List<JClassType> previousReplacements = replaced
                         .remove(superclass);
                 if (previousReplacements == null) {
-                    previousReplacements = new ArrayList<JClassType>();
+                    previousReplacements = new ArrayList<>();
                 }
 
                 previousReplacements.add(superclass);
index f26aa14ead9aac4b8971ca6c9be45f56d7309b2a..7428c643c9d4ba4e2bf6906c193c5723e19d5e00 100644 (file)
@@ -80,10 +80,10 @@ public class ConnectorBundle {
     private final Collection<TypeVisitor> visitors;
     private final Map<JType, JClassType> customSerializers;
 
-    private final Set<JType> hasSerializeSupport = new HashSet<JType>();
-    private final Set<JType> needsSerializeSupport = new HashSet<JType>();
+    private final Set<JType> hasSerializeSupport = new HashSet<>();
+    private final Set<JType> needsSerializeSupport = new HashSet<>();
 
-    private final Map<JType, GeneratedSerializer> serializers = new TreeMap<JType, GeneratedSerializer>(
+    private final Map<JType, GeneratedSerializer> serializers = new TreeMap<>(
             new Comparator<JType>() {
                 @Override
                 public int compare(JType o1, JType o2) {
@@ -91,32 +91,32 @@ public class ConnectorBundle {
                 }
             });
 
-    private final Map<JClassType, Map<JMethod, Set<MethodAttribute>>> methodAttributes = new TreeMap<JClassType, Map<JMethod, Set<MethodAttribute>>>(
+    private final Map<JClassType, Map<JMethod, Set<MethodAttribute>>> methodAttributes = new TreeMap<>(
             jClassComparator);
-    private final Set<JClassType> needsSuperClass = new TreeSet<JClassType>(
+    private final Set<JClassType> needsSuperClass = new TreeSet<>(
             jClassComparator);
-    private final Set<JClassType> needsGwtConstructor = new TreeSet<JClassType>(
+    private final Set<JClassType> needsGwtConstructor = new TreeSet<>(
             jClassComparator);
-    private final Set<JClassType> visitedTypes = new HashSet<JClassType>();
+    private final Set<JClassType> visitedTypes = new HashSet<>();
 
-    private final Set<JClassType> needsProxySupport = new TreeSet<JClassType>(
+    private final Set<JClassType> needsProxySupport = new TreeSet<>(
             jClassComparator);
 
-    private final Map<JClassType, JType> presentationTypes = new TreeMap<JClassType, JType>(
+    private final Map<JClassType, JType> presentationTypes = new TreeMap<>(
             jClassComparator);
-    private final Map<JClassType, Set<String>> identifiers = new TreeMap<JClassType, Set<String>>(
+    private final Map<JClassType, Set<String>> identifiers = new TreeMap<>(
             jClassComparator);
-    private final Map<JClassType, Set<JMethod>> needsReturnType = new TreeMap<JClassType, Set<JMethod>>(
+    private final Map<JClassType, Set<JMethod>> needsReturnType = new TreeMap<>(
             jClassComparator);
-    private final Map<JClassType, Set<JMethod>> needsInvoker = new TreeMap<JClassType, Set<JMethod>>(
+    private final Map<JClassType, Set<JMethod>> needsInvoker = new TreeMap<>(
             jClassComparator);
-    private final Map<JClassType, Set<JMethod>> needsParamTypes = new TreeMap<JClassType, Set<JMethod>>(
+    private final Map<JClassType, Set<JMethod>> needsParamTypes = new TreeMap<>(
             jClassComparator);
-    private final Map<JClassType, Set<JMethod>> needsOnStateChange = new TreeMap<JClassType, Set<JMethod>>(
+    private final Map<JClassType, Set<JMethod>> needsOnStateChange = new TreeMap<>(
             jClassComparator);
 
-    private final Set<Property> needsProperty = new TreeSet<Property>();
-    private final Map<JClassType, Set<Property>> needsDelegateToWidget = new TreeMap<JClassType, Set<Property>>(
+    private final Set<Property> needsProperty = new TreeSet<>();
+    private final Map<JClassType, Set<Property>> needsDelegateToWidget = new TreeMap<>(
             jClassComparator);
 
     private ConnectorBundle(String name, ConnectorBundle previousBundle,
@@ -140,7 +140,7 @@ public class ConnectorBundle {
 
     private static Map<JType, JClassType> findCustomSerializers(
             TypeOracle oracle) throws NotFoundException {
-        Map<JType, JClassType> serializers = new HashMap<JType, JClassType>();
+        Map<JType, JClassType> serializers = new HashMap<>();
 
         JClassType serializerInterface = oracle
                 .findType(JSONSerializer.class.getName());
@@ -406,7 +406,7 @@ public class ConnectorBundle {
     }
 
     public Collection<Property> getProperties(JClassType type) {
-        Set<Property> properties = new TreeSet<Property>();
+        Set<Property> properties = new TreeSet<>();
 
         properties.addAll(MethodProperty.findProperties(type));
         properties.addAll(FieldProperty.findProperties(type));
@@ -518,7 +518,7 @@ public class ConnectorBundle {
     private <K> void addMapping(Map<K, Set<String>> map, K key, String value) {
         Set<String> set = map.get(key);
         if (set == null) {
-            set = new TreeSet<String>();
+            set = new TreeSet<>();
             map.put(key, set);
         }
         set.add(value);
@@ -528,7 +528,7 @@ public class ConnectorBundle {
             JMethod value) {
         Set<JMethod> set = map.get(key);
         if (set == null) {
-            set = new TreeSet<JMethod>(jMethodComparator);
+            set = new TreeSet<>(jMethodComparator);
             map.put(key, set);
         }
         set.add(value);
@@ -595,7 +595,7 @@ public class ConnectorBundle {
             Map<JMethod, Set<MethodAttribute>> typeData = methodAttributes
                     .get(type);
             if (typeData == null) {
-                typeData = new TreeMap<JMethod, Set<MethodAttribute>>(
+                typeData = new TreeMap<>(
                         jMethodComparator);
                 methodAttributes.put(type, typeData);
             }
@@ -603,14 +603,14 @@ public class ConnectorBundle {
             Map<JMethod, Set<MethodAttribute>> methods = methodAttributes
                     .get(type);
             if (methods == null) {
-                methods = new TreeMap<JMethod, Set<MethodAttribute>>(
+                methods = new TreeMap<>(
                         jMethodComparator);
                 methodAttributes.put(type, methods);
             }
 
             Set<MethodAttribute> attributes = methods.get(method);
             if (attributes == null) {
-                attributes = new TreeSet<MethodAttribute>();
+                attributes = new TreeSet<>();
                 methods.put(method, attributes);
             }
 
@@ -640,7 +640,7 @@ public class ConnectorBundle {
         }
     }
 
-    private static Set<Class<?>> frameworkHandledTypes = new LinkedHashSet<Class<?>>();
+    private static Set<Class<?>> frameworkHandledTypes = new LinkedHashSet<>();
     {
         frameworkHandledTypes.add(String.class);
         frameworkHandledTypes.add(Boolean.class);
@@ -687,7 +687,7 @@ public class ConnectorBundle {
 
     public void setNeedsDelegateToWidget(Property property, JClassType type) {
         if (!isNeedsDelegateToWidget(type)) {
-            TreeSet<Property> set = new TreeSet<Property>();
+            TreeSet<Property> set = new TreeSet<>();
             set.add(property);
             needsDelegateToWidget.put(type, set);
         } else if (!needsDelegateToWidget.get(type).contains(property)) {
index ee328354d431470dcafbcd547c8a687d370410fb..a001f591c1c51174d68b6b7cf986dab968ef23bb 100644 (file)
@@ -61,7 +61,7 @@ public class FieldProperty extends Property {
     }
 
     public static Collection<FieldProperty> findProperties(JClassType type) {
-        Collection<FieldProperty> properties = new ArrayList<FieldProperty>();
+        Collection<FieldProperty> properties = new ArrayList<>();
 
         List<JField> fields = getPublicFields(type);
         for (JField field : fields) {
@@ -72,8 +72,8 @@ public class FieldProperty extends Property {
     }
 
     private static List<JField> getPublicFields(JClassType type) {
-        Set<String> names = new HashSet<String>();
-        ArrayList<JField> fields = new ArrayList<JField>();
+        Set<String> names = new HashSet<>();
+        ArrayList<JField> fields = new ArrayList<>();
         for (JClassType subType : type.getFlattenedSupertypeHierarchy()) {
             JField[] subFields = subType.getFields();
             for (JField field : subFields) {
index 65ccef8149b74512124311b548e276c6a354e95d..bd8e487cbfdd409cf3dd7715a9f8f6a8a9f51a23 100644 (file)
@@ -48,9 +48,9 @@ public class MethodProperty extends Property {
     }
 
     public static Collection<MethodProperty> findProperties(JClassType type) {
-        Collection<MethodProperty> properties = new ArrayList<MethodProperty>();
+        Collection<MethodProperty> properties = new ArrayList<>();
 
-        Set<String> getters = new HashSet<String>();
+        Set<String> getters = new HashSet<>();
         List<JMethod> setters = getSetters(type, getters);
         for (JMethod setter : setters) {
             String getter = findGetter(type, setter);
@@ -72,7 +72,7 @@ public class MethodProperty extends Property {
      */
     private static List<JMethod> getSetters(JClassType beanType,
             Set<String> getters) {
-        List<JMethod> setterMethods = new ArrayList<JMethod>();
+        List<JMethod> setterMethods = new ArrayList<>();
 
         while (beanType != null && !beanType.getQualifiedSourceName()
                 .equals(Object.class.getName())) {
index 8f6e7130c3b29f0fc2d36f10959f9bcf86ee8ce3..027747fd0968bdf27387c304c6c1ea0e584d4e85 100644 (file)
@@ -84,7 +84,7 @@ public final class CvalAddonsChecker {
      * generate nag messages in the UI.
      */
     public List<CValUiInfo> run() throws InvalidCvalException {
-        List<CValUiInfo> ret = new ArrayList<CValUiInfo>();
+        List<CValUiInfo> ret = new ArrayList<>();
         try {
             // Visit all MANIFEST in our classpath
             Enumeration<URL> manifests = Thread.currentThread()
index 2221f045b2eae9d4bf72eb420c47a7719718730a..db7900fd15f38dae8559330e35a5298d4ad482db 100644 (file)
@@ -249,20 +249,20 @@ public class ApplicationConfiguration implements EntryPoint {
 
     private HashMap<Integer, String> unknownComponents;
 
-    private Map<Integer, Class<? extends ServerConnector>> classes = new HashMap<Integer, Class<? extends ServerConnector>>();
+    private Map<Integer, Class<? extends ServerConnector>> classes = new HashMap<>();
 
     private boolean widgetsetVersionSent = false;
     private static boolean moduleLoaded = false;
 
     static// TODO consider to make this hashmap per application
-    LinkedList<Command> callbacks = new LinkedList<Command>();
+    LinkedList<Command> callbacks = new LinkedList<>();
 
     private static int dependenciesLoading;
 
-    private static ArrayList<ApplicationConnection> runningApplications = new ArrayList<ApplicationConnection>();
+    private static ArrayList<ApplicationConnection> runningApplications = new ArrayList<>();
 
-    private Map<Integer, Integer> componentInheritanceMap = new HashMap<Integer, Integer>();
-    private Map<Integer, String> tagToServerSideClassName = new HashMap<Integer, String>();
+    private Map<Integer, Integer> componentInheritanceMap = new HashMap<>();
+    private Map<Integer, String> tagToServerSideClassName = new HashMap<>();
 
     /**
      * Checks whether path info in requests to the server-side service should be
@@ -528,7 +528,7 @@ public class ApplicationConfiguration implements EntryPoint {
             if (type == null) {
                 type = UnknownComponentConnector.class;
                 if (unknownComponents == null) {
-                    unknownComponents = new HashMap<Integer, String>();
+                    unknownComponents = new HashMap<>();
                 }
                 unknownComponents.put(tag, getServerSideClassNameForTag(tag));
             }
@@ -572,7 +572,7 @@ public class ApplicationConfiguration implements EntryPoint {
      * @return Integer array of tags pointing to this classname
      */
     public Integer[] getTagsForServerSideClassName(String classname) {
-        List<Integer> tags = new ArrayList<Integer>();
+        List<Integer> tags = new ArrayList<>();
 
         for (Map.Entry<Integer, String> entry : tagToServerSideClassName
                 .entrySet()) {
index 8bc6a7460f08ae08af03ec6cb017ec308f8ab525..1fe1f83cb1a526a2ec23463bc0ba8ed58f3fca38 100644 (file)
@@ -117,7 +117,7 @@ public class ApplicationConnection implements HasHandlers {
      */
     public static final String UIDL_REFRESH_TOKEN = "Vaadin-Refresh";
 
-    private final HashMap<String, String> resourcesMap = new HashMap<String, String>();
+    private final HashMap<String, String> resourcesMap = new HashMap<>();
 
     private WidgetSet widgetSet;
 
@@ -159,7 +159,7 @@ public class ApplicationConnection implements HasHandlers {
     public static class RequestStartingEvent
             extends ApplicationConnectionEvent {
 
-        public static Type<CommunicationHandler> TYPE = new Type<CommunicationHandler>();
+        public static Type<CommunicationHandler> TYPE = new Type<>();
 
         public RequestStartingEvent(ApplicationConnection connection) {
             super(connection);
@@ -179,7 +179,7 @@ public class ApplicationConnection implements HasHandlers {
     public static class ResponseHandlingEndedEvent
             extends ApplicationConnectionEvent {
 
-        public static Type<CommunicationHandler> TYPE = new Type<CommunicationHandler>();
+        public static Type<CommunicationHandler> TYPE = new Type<>();
 
         public ResponseHandlingEndedEvent(ApplicationConnection connection) {
             super(connection);
@@ -218,7 +218,7 @@ public class ApplicationConnection implements HasHandlers {
             super(connection);
         }
 
-        public static Type<CommunicationHandler> TYPE = new Type<CommunicationHandler>();
+        public static Type<CommunicationHandler> TYPE = new Type<>();
 
         @Override
         public Type<CommunicationHandler> getAssociatedType() {
@@ -246,7 +246,7 @@ public class ApplicationConnection implements HasHandlers {
     public static class ApplicationStoppedEvent
             extends GwtEvent<ApplicationStoppedHandler> {
 
-        public static Type<ApplicationStoppedHandler> TYPE = new Type<ApplicationStoppedHandler>();
+        public static Type<ApplicationStoppedHandler> TYPE = new Type<>();
 
         @Override
         public Type<ApplicationStoppedHandler> getAssociatedType() {
index 43874a192245cb162b808710f0d46cc6e26681d6..ebdcc4414c00b329b053d2e1f9ca66fd5c8de6f5 100644 (file)
@@ -61,7 +61,7 @@ class ComponentDetail {
             additionalTooltips.remove(key);
         } else {
             if (additionalTooltips == null) {
-                additionalTooltips = new HashMap<Object, TooltipInfo>();
+                additionalTooltips = new HashMap<>();
             }
             additionalTooltips.put(key, tooltip);
         }
index bed3ae9387f540d04f7abd9aab1f0e539d7482ac..f95c1c1a832bd362b935ea2d0b48f8364f92dc5d 100644 (file)
@@ -80,7 +80,7 @@ final class ComponentDetailMap extends JavaScriptObject {
     }-*/;
 
     final Collection<ComponentDetail> values() {
-        ArrayList<ComponentDetail> list = new ArrayList<ComponentDetail>();
+        ArrayList<ComponentDetail> list = new ArrayList<>();
         fillWithValues(list);
         return list;
     }
index f63a509161023644469f703d244b1cf6c3588e02..516cd808b59c199d0d3584785adaa3b5703d7be0 100644 (file)
@@ -39,7 +39,7 @@ public class ConnectorHierarchyChangeEvent
     /**
      * Type of this event, used by the event bus.
      */
-    public static final Type<ConnectorHierarchyChangeHandler> TYPE = new Type<ConnectorHierarchyChangeHandler>();
+    public static final Type<ConnectorHierarchyChangeHandler> TYPE = new Type<>();
 
     List<ComponentConnector> oldChildren;
 
index 8ac9fe5c8f5fd56c9fa35b6b0cc393d77883583e..ab31f0c1cb0ea939f048226c407bbde04eddfe95 100644 (file)
@@ -217,7 +217,7 @@ public class ConnectorMap {
      */
     @Deprecated
     public ComponentConnector[] getComponentConnectors() {
-        ArrayList<ComponentConnector> result = new ArrayList<ComponentConnector>();
+        ArrayList<ComponentConnector> result = new ArrayList<>();
 
         JsArrayObject<ServerConnector> connectors = getConnectorsAsJsArray();
         int size = connectors.size();
@@ -267,7 +267,7 @@ public class ConnectorMap {
     @Deprecated
     public Collection<? extends ServerConnector> getConnectors() {
         Collection<ComponentDetail> values = idToComponentDetail.values();
-        ArrayList<ServerConnector> arrayList = new ArrayList<ServerConnector>(
+        ArrayList<ServerConnector> arrayList = new ArrayList<>(
                 values.size());
         for (ComponentDetail componentDetail : values) {
             arrayList.add(componentDetail.getConnector());
index 04d316a4e92085d82048846d37a736f5e8ed6899..4a6e474a592b25f61b546bdbbfda107e10cd126a 100644 (file)
@@ -45,9 +45,9 @@ public class JavaScriptConnectorHelper {
             .createObject();
     private final JavaScriptObject rpcMap = JavaScriptObject.createObject();
 
-    private final Map<String, JavaScriptObject> rpcObjects = new HashMap<String, JavaScriptObject>();
-    private final Map<String, Set<String>> rpcMethods = new HashMap<String, Set<String>>();
-    private final Map<Element, Map<JavaScriptObject, ElementResizeListener>> resizeListeners = new HashMap<Element, Map<JavaScriptObject, ElementResizeListener>>();
+    private final Map<String, JavaScriptObject> rpcObjects = new HashMap<>();
+    private final Map<String, Set<String>> rpcMethods = new HashMap<>();
+    private final Map<Element, Map<JavaScriptObject, ElementResizeListener>> resizeListeners = new HashMap<>();
 
     private JavaScriptObject connectorWrapper;
     private int tag;
@@ -120,7 +120,7 @@ public class JavaScriptConnectorHelper {
                     JavaScriptObject wildcardRpcObject = rpcObjects.get("");
                     Set<String> interfaces = rpcMethods.get(method);
                     if (interfaces == null) {
-                        interfaces = new HashSet<String>();
+                        interfaces = new HashSet<>();
                         rpcMethods.put(method, interfaces);
                         attachRpcMethod(wildcardRpcObject, null, method);
                     }
@@ -155,7 +155,7 @@ public class JavaScriptConnectorHelper {
     protected boolean initJavaScript() {
         ApplicationConfiguration conf = connector.getConnection()
                 .getConfiguration();
-        ArrayList<String> attemptedNames = new ArrayList<String>();
+        ArrayList<String> attemptedNames = new ArrayList<>();
         Integer tag = Integer.valueOf(this.tag);
         while (tag != null) {
             String serverSideClassName = conf.getServerSideClassNameForTag(tag);
@@ -260,7 +260,7 @@ public class JavaScriptConnectorHelper {
         Map<JavaScriptObject, ElementResizeListener> elementListeners = resizeListeners
                 .get(element);
         if (elementListeners == null) {
-            elementListeners = new HashMap<JavaScriptObject, ElementResizeListener>();
+            elementListeners = new HashMap<>();
             resizeListeners.put(element, elementListeners);
         }
 
index 48a5ae10e53da09609752eca5d3230ce6ed55b1b..841eead561f83ca89f823e443ac869eeb81c1fd4 100644 (file)
@@ -46,7 +46,7 @@ public class LayoutManager {
     private static final boolean debugLogging = false;
 
     private ApplicationConnection connection;
-    private final Set<Element> measuredNonConnectorElements = new HashSet<Element>();
+    private final Set<Element> measuredNonConnectorElements = new HashSet<>();
     private final MeasuredSize nullSize = new MeasuredSize();
 
     private LayoutDependencyTree currentDependencyTree;
@@ -58,8 +58,8 @@ public class LayoutManager {
 
     private FastStringSet pendingOverflowFixes = FastStringSet.create();
 
-    private final Map<Element, Collection<ElementResizeListener>> elementResizeListeners = new HashMap<Element, Collection<ElementResizeListener>>();
-    private final Set<Element> listenersToFire = new HashSet<Element>();
+    private final Map<Element, Collection<ElementResizeListener>> elementResizeListeners = new HashMap<>();
+    private final Set<Element> listenersToFire = new HashSet<>();
 
     private boolean layoutPending = false;
     private Timer layoutTimer = new Timer() {
@@ -618,7 +618,7 @@ public class LayoutManager {
         int pendingOverflowCount = pendingOverflowConnectorsIds.length();
         ConnectorMap connectorMap = ConnectorMap.get(connection);
         if (pendingOverflowCount > 0) {
-            HashMap<Element, String> originalOverflows = new HashMap<Element, String>();
+            HashMap<Element, String> originalOverflows = new HashMap<>();
 
             FastStringSet delayedOverflowFixes = FastStringSet.create();
 
@@ -1724,7 +1724,7 @@ public class LayoutManager {
         Collection<ElementResizeListener> listeners = elementResizeListeners
                 .get(element);
         if (listeners == null) {
-            listeners = new HashSet<ElementResizeListener>();
+            listeners = new HashSet<>();
             elementResizeListeners.put(element, listeners);
             ensureMeasured(element);
         }
index 661c885c9f51cc06dfef98f7223b0d60d6b6e6b2..01fbeb4d2c69327e4d9707db0a8688f2c8cb3b61 100644 (file)
@@ -33,7 +33,7 @@ import com.vaadin.shared.ui.ui.UIState.LocaleData;
  */
 public class LocaleService {
 
-    private static Map<String, LocaleData> cache = new HashMap<String, LocaleData>();
+    private static Map<String, LocaleData> cache = new HashMap<>();
 
     private static String defaultLocale;
 
index 223f19b1b052dcfbd82b3b0651184df7842404fd..290ec8a4a9bc5ac8eb174861c95d3fa310ea33b1 100644 (file)
@@ -89,7 +89,7 @@ public class Profiler {
      */
     public static class Node {
         private final String name;
-        private final LinkedHashMap<String, Node> children = new LinkedHashMap<String, Node>();
+        private final LinkedHashMap<String, Node> children = new LinkedHashMap<>();
         private double time = 0;
         private int count = 0;
         private double enterTime = 0;
@@ -462,7 +462,7 @@ public class Profiler {
             return;
         }
 
-        LinkedList<Node> stack = new LinkedList<Node>();
+        LinkedList<Node> stack = new LinkedList<>();
         Node rootNode = new Node(null);
         stack.add(rootNode);
         JsArray<GwtStatsEvent> gwtStatsEvents = getGwtStatsEvents();
@@ -472,7 +472,7 @@ public class Profiler {
             return;
         }
 
-        Set<Node> extendedTimeNodes = new HashSet<Node>();
+        Set<Node> extendedTimeNodes = new HashSet<>();
         for (int i = 0; i < gwtStatsEvents.length(); i++) {
             GwtStatsEvent gwtStatsEvent = gwtStatsEvents.get(i);
             String eventName = gwtStatsEvent.getEventName();
@@ -540,10 +540,10 @@ public class Profiler {
             return;
         }
 
-        Map<String, Node> totals = new HashMap<String, Node>();
+        Map<String, Node> totals = new HashMap<>();
         rootNode.sumUpTotals(totals);
 
-        ArrayList<Node> totalList = new ArrayList<Node>(totals.values());
+        ArrayList<Node> totalList = new ArrayList<>(totals.values());
         Collections.sort(totalList, new Comparator<Node>() {
             @Override
             public int compare(Node o1, Node o2) {
@@ -584,7 +584,7 @@ public class Profiler {
                     "domContentLoadedEventStart", "domContentLoadedEventEnd",
                     "domComplete", "loadEventStart", "loadEventEnd" };
 
-            LinkedHashMap<String, Double> timings = new LinkedHashMap<String, Double>();
+            LinkedHashMap<String, Double> timings = new LinkedHashMap<>();
 
             for (String key : keys) {
                 double value = getPerformanceTiming(key);
index 72274c8d422f096139845e1874660f0d72fa5d74..37f6f51a4c0e75507c415ffccd29ca92e52533d4 100644 (file)
@@ -142,11 +142,11 @@ public class ResourceLoader {
 
     private ApplicationConnection connection;
 
-    private final Set<String> loadedResources = new HashSet<String>();
-    private final Set<String> preloadedResources = new HashSet<String>();
+    private final Set<String> loadedResources = new HashSet<>();
+    private final Set<String> preloadedResources = new HashSet<>();
 
-    private final Map<String, Collection<ResourceLoadListener>> loadListeners = new HashMap<String, Collection<ResourceLoadListener>>();
-    private final Map<String, Collection<ResourceLoadListener>> preloadListeners = new HashMap<String, Collection<ResourceLoadListener>>();
+    private final Map<String, Collection<ResourceLoadListener>> loadListeners = new HashMap<>();
+    private final Map<String, Collection<ResourceLoadListener>> preloadListeners = new HashMap<>();
 
     private final Element head;
 
@@ -555,7 +555,7 @@ public class ResourceLoader {
             Map<String, Collection<ResourceLoadListener>> listenerMap) {
         Collection<ResourceLoadListener> listeners = listenerMap.get(url);
         if (listeners == null) {
-            listeners = new HashSet<ResourceLoader.ResourceLoadListener>();
+            listeners = new HashSet<>();
             listeners.add(listener);
             listenerMap.put(url, listeners);
             return true;
index dd546eb4bb062b382a96f95df8f4883ed5676cd3..165f0c6b0574a321c6aa62cd0131d1a45f9bd9cc 100644 (file)
@@ -121,7 +121,7 @@ public final class UIDL extends JavaScriptObject {
      */
     public Set<String> getVariableNames() {
         if (!hasVariables()) {
-            return new HashSet<String>();
+            return new HashSet<>();
         } else {
             Set<String> keySet = var().getKeySet();
             return keySet;
@@ -453,7 +453,7 @@ public final class UIDL extends JavaScriptObject {
      * @return the value of the variable
      */
     public Set<String> getStringArrayVariableAsSet(final String name) {
-        final HashSet<String> s = new HashSet<String>();
+        final HashSet<String> s = new HashSet<>();
         JsArrayString a = var().getJSStringArray(name);
         for (int i = 0; i < a.length(); i++) {
             s.add(a.get(i));
index 7d7a6483e349e9ad650b1ba19946a1f2f5df2b50..553911b7b87d6b9b614ec78a3e45df4d2bf295e8 100644 (file)
@@ -777,7 +777,7 @@ public class Util {
         try {
             getLogger().info("RPC invocations to be sent to the server:");
             String curId = null;
-            ArrayList<MethodInvocation> invocations = new ArrayList<MethodInvocation>();
+            ArrayList<MethodInvocation> invocations = new ArrayList<>();
             for (MethodInvocation methodInvocation : methodInvocations) {
                 String id = methodInvocation.getConnectorId();
 
index ebc387a48601adf5a4f425c89c07e7db8c9b757c..119e169e82707149fca447fd520e91c35fd209c5 100644 (file)
@@ -62,7 +62,7 @@ public final class ValueMap extends JavaScriptObject {
     }-*/;
 
     public Set<String> getKeySet() {
-        final HashSet<String> attrs = new HashSet<String>();
+        final HashSet<String> attrs = new HashSet<>();
         JsArrayString attributeNamesArray = getKeyArray();
         for (int i = 0; i < attributeNamesArray.length(); i++) {
             attrs.add(attributeNamesArray.get(i));
index 6e002b6fc20a3e3db982cf11b2125a9a2271de6e..5a2fb06a691ee8caf25c2332ef199192bd910e82 100644 (file)
@@ -26,7 +26,7 @@ import java.util.HashMap;
  */
 abstract class WidgetMap {
 
-    protected static HashMap<Class<? extends ServerConnector>, WidgetInstantiator> instmap = new HashMap<Class<? extends ServerConnector>, WidgetInstantiator>();
+    protected static HashMap<Class<? extends ServerConnector>, WidgetInstantiator> instmap = new HashMap<>();
 
     /**
      * Create a new instance of a connector based on its type.
index 8ba678e4292e472236aeec639d84292c1b39b637..5a679e897dd4845930ffe6e2459fcac8e30113b6 100644 (file)
@@ -1387,7 +1387,7 @@ public class WidgetUtil {
         /*
          * Map the size units with their type.
          */
-        private static Map<String, Unit> type2Unit = new HashMap<String, Style.Unit>();
+        private static Map<String, Unit> type2Unit = new HashMap<>();
         static {
             for (Unit unit : Unit.values()) {
                 type2Unit.put(unit.getType(), unit);
index 4de251a4113a3b3f0c8063f3b169b77e5cca85e1..9a0eb6098399469d2dcd25942eaa140d0bddbf29 100644 (file)
@@ -203,7 +203,7 @@ public class JsonDecoder {
         if (jsonMap.getType() == JsonType.ARRAY) {
             JsonArray array = (JsonArray) jsonMap;
             if (array.length() == 0) {
-                return new HashMap<Object, Object>();
+                return new HashMap<>();
             }
         }
 
@@ -228,7 +228,7 @@ public class JsonDecoder {
     private static Map<Object, Object> decodeObjectMap(Type keyType,
             Type valueType, JsonArray jsonValue,
             ApplicationConnection connection) {
-        Map<Object, Object> map = new HashMap<Object, Object>();
+        Map<Object, Object> map = new HashMap<>();
 
         JsonArray keys = jsonValue.get(0);
         JsonArray values = jsonValue.get(1);
@@ -249,7 +249,7 @@ public class JsonDecoder {
 
     private static Map<Object, Object> decodeConnectorMap(Type valueType,
             JsonObject jsonMap, ApplicationConnection connection) {
-        Map<Object, Object> map = new HashMap<Object, Object>();
+        Map<Object, Object> map = new HashMap<>();
 
         ConnectorMap connectorMap = ConnectorMap.get(connection);
 
@@ -264,7 +264,7 @@ public class JsonDecoder {
 
     private static Map<Object, Object> decodeStringMap(Type valueType,
             JsonObject jsonMap, ApplicationConnection connection) {
-        Map<Object, Object> map = new HashMap<Object, Object>();
+        Map<Object, Object> map = new HashMap<>();
 
         for (String key : jsonMap.keys()) {
             Object value = decodeValue(valueType, jsonMap.get(key), null,
@@ -277,7 +277,7 @@ public class JsonDecoder {
 
     private static List<Object> decodeList(Type type, JsonArray jsonArray,
             ApplicationConnection connection) {
-        List<Object> tokens = new ArrayList<Object>();
+        List<Object> tokens = new ArrayList<>();
         decodeIntoCollection(type.getParameterTypes()[0], jsonArray, connection,
                 tokens);
         return tokens;
@@ -285,7 +285,7 @@ public class JsonDecoder {
 
     private static Set<Object> decodeSet(Type type, JsonArray jsonArray,
             ApplicationConnection connection) {
-        Set<Object> tokens = new HashSet<Object>();
+        Set<Object> tokens = new HashSet<>();
         decodeIntoCollection(type.getParameterTypes()[0], jsonArray, connection,
                 tokens);
         return tokens;
index f3c84c39c300b4ba751e4253999bd2ec1cc70c3c..a8e22ea53b1760b07ec60e74074ff45a5d0665aa 100644 (file)
@@ -123,12 +123,12 @@ public class MessageHandler {
      * If responseHandlingLocks contains any objects, response handling is
      * suspended until the collection is empty or a timeout has occurred.
      */
-    private Set<Object> responseHandlingLocks = new HashSet<Object>();
+    private Set<Object> responseHandlingLocks = new HashSet<>();
 
     /**
      * Contains all UIDL messages received while response handling is suspended
      */
-    private List<PendingUIDLMessage> pendingUIDLMessages = new ArrayList<PendingUIDLMessage>();
+    private List<PendingUIDLMessage> pendingUIDLMessages = new ArrayList<>();
 
     // will hold the CSRF token once received
     private String csrfToken = ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE;
@@ -1227,8 +1227,8 @@ public class MessageHandler {
                     Profiler.enter(
                             "updateConnectorHierarchy find new connectors");
 
-                    List<ServerConnector> newChildren = new ArrayList<ServerConnector>();
-                    List<ComponentConnector> newComponents = new ArrayList<ComponentConnector>();
+                    List<ServerConnector> newChildren = new ArrayList<>();
+                    List<ComponentConnector> newComponents = new ArrayList<>();
                     for (int connectorIndex = 0; connectorIndex < childConnectorSize; connectorIndex++) {
                         String childConnectorId = childConnectorIds
                                 .get(connectorIndex);
index dfea30eb869792b5a2d9a62d10929f16bf12033f..35d6f48565ff85b5c06fae7e34dcf2bca21c8838 100644 (file)
@@ -53,7 +53,7 @@ public class ServerRpcQueue {
      * invocation. Without lastonly, an incremental id based on
      * {@link #lastInvocationTag} is used to get unique values.
      */
-    private LinkedHashMap<String, MethodInvocation> pendingInvocations = new LinkedHashMap<String, MethodInvocation>();
+    private LinkedHashMap<String, MethodInvocation> pendingInvocations = new LinkedHashMap<>();
 
     private int lastInvocationTag = 0;
 
index c5872866a9d9494333d1990a971db5f269683055..0795d69b321d9a3ef30a740396a445f22833adfd 100644 (file)
@@ -38,7 +38,7 @@ public class StateChangeEvent
     /**
      * Type of this event, used by the event bus.
      */
-    public static final Type<StateChangeHandler> TYPE = new Type<StateChangeHandler>();
+    public static final Type<StateChangeHandler> TYPE = new Type<>();
 
     /**
      * Used to cache a FastStringSet representation of the properties that have
@@ -158,7 +158,7 @@ public class StateChangeEvent
     public Set<String> getChangedProperties() {
         if (changedPropertiesSet == null) {
             Profiler.enter("StateChangeEvent.getChangedProperties populate");
-            changedPropertiesSet = new HashSet<String>();
+            changedPropertiesSet = new HashSet<>();
             getChangedPropertiesFastSet().addAllTo(changedPropertiesSet);
             Profiler.leave("StateChangeEvent.getChangedProperties populate");
         }
index 9f34c3468bb752bde8d0685bc590a0ebb2b05196..2e56918ab37f01d2c3c4d55f36ed39cbe8cfc793 100644 (file)
@@ -242,7 +242,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
     @Override
     public List<Element> getElementsByPath(String path) {
         // This type of search is not supported in LegacyLocator
-        List<Element> array = new ArrayList<Element>();
+        List<Element> array = new ArrayList<>();
         Element e = getElementByPath(path);
         if (e != null) {
             array.add(e);
@@ -257,7 +257,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
     public List<Element> getElementsByPathStartingAt(String path,
             Element root) {
         // This type of search is not supported in LegacyLocator
-        List<Element> array = new ArrayList<Element>();
+        List<Element> array = new ArrayList<>();
         Element e = getElementByPathStartingAt(path, root);
         if (e != null) {
             array.add(e);
@@ -647,7 +647,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
                 if (widgetClassName.equals("VWindow")) {
                     List<WindowConnector> windows = client.getUIConnector()
                             .getSubWindows();
-                    List<VWindow> windowWidgets = new ArrayList<VWindow>(
+                    List<VWindow> windowWidgets = new ArrayList<>(
                             windows.size());
                     for (WindowConnector wc : windows) {
                         windowWidgets.add(wc.getWidget());
index f76a0bc34c4b33a5113d415b57d139aeb35dec6c..f01c693c4cdb957441382b931992500d74d54152 100644 (file)
@@ -38,7 +38,7 @@ public class SelectorPredicate {
         if (path.startsWith("(")) {
             return extractPredicates(path.substring(path.lastIndexOf(')')));
         }
-        return new ArrayList<SelectorPredicate>();
+        return new ArrayList<>();
     }
 
     /**
@@ -49,7 +49,7 @@ public class SelectorPredicate {
      * @return a List of Predicate objects
      */
     public static List<SelectorPredicate> extractPredicates(String path) {
-        List<SelectorPredicate> predicates = new ArrayList<SelectorPredicate>();
+        List<SelectorPredicate> predicates = new ArrayList<>();
 
         String predicateStr = extractPredicateString(path);
         if (null == predicateStr || predicateStr.length() == 0) {
@@ -114,7 +114,7 @@ public class SelectorPredicate {
      * @return List of predicate strings
      */
     private static List<String> readPredicatesFromString(String predicateStr) {
-        List<String> predicates = new ArrayList<String>();
+        List<String> predicates = new ArrayList<>();
         int prevIdx = 0;
         int idx = LocatorUtil.indexOfIgnoringQuoted(predicateStr, ',', prevIdx);
 
index 3e1387b314e838c4f0bd91a7c33fc95d3f5a01d3..3ba6284cf220a674fc93eb6fedf8fb5797dee0ac 100644 (file)
@@ -98,7 +98,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
 
         List<ConnectorPath> hierarchy = getConnectorHierarchyForElement(
                 targetElement);
-        List<String> path = new ArrayList<String>();
+        List<String> path = new ArrayList<>();
 
         // Assemble longname path components back-to-forth with useful
         // predicates - first try ID, then caption.
@@ -182,7 +182,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
      */
     private List<String> generateQueries(List<String> components) {
         // Prepare to loop through all the elements.
-        List<String> paths = new ArrayList<String>();
+        List<String> paths = new ArrayList<>();
         int compIdx = 0;
         String basePath = components.get(compIdx).replace("com.vaadin.ui.", "");
         // Add a basic search for the first element (eg. //Button)
@@ -243,7 +243,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
     private List<ConnectorPath> getConnectorHierarchyForElement(Element elem) {
         Element e = elem;
         ComponentConnector c = Util.findPaintable(client, e);
-        List<ConnectorPath> connectorHierarchy = new ArrayList<ConnectorPath>();
+        List<ConnectorPath> connectorHierarchy = new ArrayList<>();
 
         while (c != null) {
 
@@ -281,7 +281,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
             path = path.substring(1, path.lastIndexOf(')'));
         }
 
-        List<Element> elements = new ArrayList<Element>();
+        List<Element> elements = new ArrayList<>();
         if (LocatorUtil.isNotificationElement(path)) {
 
             for (VNotification n : findNotificationsByPath(path)) {
@@ -385,7 +385,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
      */
     private List<VNotification> findNotificationsByPath(String path) {
 
-        List<VNotification> notifications = new ArrayList<VNotification>();
+        List<VNotification> notifications = new ArrayList<>();
         for (Widget w : RootPanel.get()) {
             if (w instanceof VNotification) {
                 notifications.add((VNotification) w);
@@ -431,7 +431,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
             connectors = Arrays.asList(root);
         }
 
-        List<Element> output = new ArrayList<Element>();
+        List<Element> output = new ArrayList<>();
         if (null != connectors && !connectors.isEmpty()) {
             for (ComponentConnector connector : connectors) {
                 if (!actualRoot
@@ -474,7 +474,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
 
         String[] fragments = splitFirstFragmentFromTheRest(path);
 
-        List<ComponentConnector> connectors = new ArrayList<ComponentConnector>();
+        List<ComponentConnector> connectors = new ArrayList<>();
         for (ComponentConnector parent : parents) {
             connectors.addAll(filterMatches(
                     collectPotentialMatches(parent, fragments[0],
@@ -557,7 +557,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
     private List<ComponentConnector> collectPotentialMatches(
             ComponentConnector parent, String pathFragment,
             boolean collectRecursively) {
-        ArrayList<ComponentConnector> potentialMatches = new ArrayList<ComponentConnector>();
+        ArrayList<ComponentConnector> potentialMatches = new ArrayList<>();
         String widgetName = getWidgetName(pathFragment);
         // Special case when searching for UIElement.
         if (LocatorUtil.isUIElement(pathFragment)) {
@@ -585,7 +585,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
 
     private List<String> getIDsForConnector(ComponentConnector connector) {
         Class<?> connectorClass = connector.getClass();
-        List<String> ids = new ArrayList<String>();
+        List<String> ids = new ArrayList<>();
 
         TypeDataStore.get().findIdentifiersFor(connectorClass).addAllTo(ids);
 
@@ -732,7 +732,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
      */
     private final <T> List<T> eliminateDuplicates(List<T> list) {
 
-        LinkedHashSet<T> set = new LinkedHashSet<T>(list);
+        LinkedHashSet<T> set = new LinkedHashSet<>(list);
         list.clear();
         list.addAll(set);
         return list;
index b2b3372764a668a7c3f2546b7a6ac0d54c49478c..d3e381f0c373f3144ba274200ba30356e80b3b83 100644 (file)
@@ -48,7 +48,7 @@ public class DataCommunicatorConnector extends AbstractExtensionConnector {
      */
     public class VaadinDataSource extends AbstractRemoteDataSource<JsonObject> {
 
-        private Set<String> droppedKeys = new HashSet<String>();
+        private Set<String> droppedKeys = new HashSet<>();
 
         protected VaadinDataSource() {
             registerRpc(DataCommunicatorClientRpc.class,
@@ -61,7 +61,7 @@ public class DataCommunicatorConnector extends AbstractExtensionConnector {
 
                         @Override
                         public void setData(int firstIndex, JsonArray data) {
-                            ArrayList<JsonObject> rows = new ArrayList<JsonObject>(
+                            ArrayList<JsonObject> rows = new ArrayList<>(
                                     data.length());
                             for (int i = 0; i < data.length(); i++) {
                                 JsonObject rowObject = data.getObject(i);
index 9f2b8971c13b8b674a2fdf73f095a702f86dcbce..2259f47647d3766cb4f1dd599fee0b06e8a7099a 100644 (file)
@@ -66,7 +66,7 @@ public class GridConnector extends AbstractListingConnector
     protected void init() {
         super.init();
 
-        new ClickSelectHandler<JsonObject>(getWidget());
+        new ClickSelectHandler<>(getWidget());
         getWidget().addSortHandler(this::handleSortEvent);
 
         layout();
index 71568cac7acbbecf484d0b61e92b2fcdbad9e807..9cc32998b2a826c4f24f51d704202a90ee922da6 100644 (file)
@@ -178,8 +178,8 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
 
     private Range cached = Range.between(0, 0);
 
-    private final HashMap<Integer, T> indexToRowMap = new HashMap<Integer, T>();
-    private final HashMap<Object, Integer> keyToIndexMap = new HashMap<Object, Integer>();
+    private final HashMap<Integer, T> indexToRowMap = new HashMap<>();
+    private final HashMap<Object, Integer> keyToIndexMap = new HashMap<>();
 
     private Set<DataChangeHandler> dataChangeHandlers = new LinkedHashSet<>();
 
@@ -193,8 +193,8 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
         }
     };
 
-    private Map<Object, Integer> pinnedCounts = new HashMap<Object, Integer>();
-    private Map<Object, RowHandleImpl> pinnedRows = new HashMap<Object, RowHandleImpl>();
+    private Map<Object, Integer> pinnedCounts = new HashMap<>();
+    private Map<Object, RowHandleImpl> pinnedRows = new HashMap<>();
 
     // Size not yet known
     private int size = -1;
@@ -374,7 +374,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
         if (range.isEmpty()) {
             return;
         }
-        currentRequestCallback = new RequestRowsCallback<T>(this, range);
+        currentRequestCallback = new RequestRowsCallback<>(this, range);
         requestRows(range.getStart(), range.length(), currentRequestCallback);
     }
 
index a33f7f8ceb26fca8e710bc21bcf7b182819a490f..a1bcae5524bd5eb20674d6278a6303a2b2dfdd4e 100644 (file)
@@ -49,7 +49,7 @@ import com.vaadin.client.ValueMap;
  */
 public class AnalyzeLayoutsPanel extends FlowPanel {
 
-    private List<SelectConnectorListener> listeners = new ArrayList<SelectConnectorListener>();
+    private List<SelectConnectorListener> listeners = new ArrayList<>();
 
     public void update() {
         clear();
@@ -79,8 +79,8 @@ public class AnalyzeLayoutsPanel extends FlowPanel {
             add(new Label("Layouts analyzed, no top level problems"));
         }
 
-        Set<ComponentConnector> zeroHeightComponents = new HashSet<ComponentConnector>();
-        Set<ComponentConnector> zeroWidthComponents = new HashSet<ComponentConnector>();
+        Set<ComponentConnector> zeroHeightComponents = new HashSet<>();
+        Set<ComponentConnector> zeroWidthComponents = new HashSet<>();
         findZeroSizeComponents(zeroHeightComponents, zeroWidthComponents,
                 ac.getUIConnector());
         if (zeroHeightComponents.size() > 0 || zeroWidthComponents.size() > 0) {
@@ -106,7 +106,7 @@ public class AnalyzeLayoutsPanel extends FlowPanel {
             Set<ComponentConnector> zeroSized, ApplicationConnection ac) {
 
         // keep track of already highlighted parents
-        HashSet<String> parents = new HashSet<String>();
+        HashSet<String> parents = new HashSet<>();
 
         for (final ComponentConnector connector : zeroSized) {
             final ServerConnector parent = connector.getParent();
index c724b95b4e4fe163b2fa290d827b026bca0c499a..89d50a39b34255ba5b5c0eb41ae7bd967aeda24e 100644 (file)
@@ -48,7 +48,7 @@ public class ConnectorInfoPanel extends FlowPanel {
     public void update(ServerConnector connector) {
         SharedState state = connector.getState();
 
-        Set<String> ignoreProperties = new HashSet<String>();
+        Set<String> ignoreProperties = new HashSet<>();
         ignoreProperties.add("id");
 
         String html = getRowHTML("Id", connector.getConnectorId());
index d3322b64a531c554f4d049ad9ac0e8586e3e47a3..e70da1188c8a97bdb3e061f7de61c5c55c2bf108 100644 (file)
@@ -45,7 +45,7 @@ import com.vaadin.client.Util;
 public class HierarchyPanel extends FlowPanel {
 
     // TODO separate click listeners for simple selection and doubleclick
-    private List<SelectConnectorListener> listeners = new ArrayList<SelectConnectorListener>();
+    private List<SelectConnectorListener> listeners = new ArrayList<>();
 
     public void update() {
         // Try to keep track of currently open nodes and reopen them
index 502949d4c8f980537934ade38f94c81c3dc4bc09..7601a39289dd9ec4a463837cba19c8e160a7002a 100644 (file)
@@ -180,7 +180,7 @@ public class Highlight {
     static Element show(Element element, String color) {
         if (element != null) {
             if (highlights == null) {
-                highlights = new HashSet<Element>();
+                highlights = new HashSet<>();
             }
 
             Element highlight = DOM.createDiv();
index 5db2611b1813b7732ce9e064332d9ef028f90b7a..807b6e65bbcd0c2253f20c3b4d222a38d3ad00e6 100644 (file)
@@ -76,7 +76,7 @@ public class OptimizedWidgetsetPanel extends FlowPanel {
     private Set<String> getUsedConnectorNames(
             ApplicationConfiguration configuration) {
         int tag = 0;
-        Set<String> usedConnectors = new HashSet<String>();
+        Set<String> usedConnectors = new HashSet<>();
         while (true) {
             String serverSideClass = configuration
                     .getServerSideClassNameForTag(tag);
index 3291e6497335ac24a04a5a8c3f8fbb8a50c62202..be6bd231e8a4e7ea13f0827789c46ab293d90bd4 100644 (file)
@@ -38,8 +38,8 @@ public class SelectorPath {
     private final String path;
     private final Element element;
     private final ComponentLocator locator;
-    private static Map<String, Integer> counter = new HashMap<String, Integer>();
-    private static Map<String, String> legacyNames = new HashMap<String, String>();
+    private static Map<String, Integer> counter = new HashMap<>();
+    private static Map<String, String> legacyNames = new HashMap<>();
 
     static {
         legacyNames.put("FilterSelect", "ComboBox");
index 644fde4f0c8ec9a8dfb63cd8cc089e5a9a16593d..e838c417ba88b5e8721e9acab84be8ff4c539801 100644 (file)
@@ -94,7 +94,7 @@ public class TestBenchSection implements Section {
 
     private final FlowPanel selectorPanel = new FlowPanel();
     // map from full path to SelectorWidget to enable reuse of old selectors
-    private Map<SelectorPath, SelectorWidget> selectorWidgets = new HashMap<SelectorPath, SelectorWidget>();
+    private Map<SelectorPath, SelectorWidget> selectorWidgets = new HashMap<>();
 
     private final FlowPanel controls = new FlowPanel();
 
index 12ff06dd8ba362180a0ba21b1b93871d1e011f16..3abc848187d63c7b77a41c4144c92eb4a1d86a44 100644 (file)
@@ -133,7 +133,7 @@ public final class VDebugWindow extends VOverlay {
     protected SimplePanel content = new SimplePanel();
 
     // sections
-    protected ArrayList<Section> sections = new ArrayList<Section>();
+    protected ArrayList<Section> sections = new ArrayList<>();
 
     // handles resize/move
     protected HandlerRegistration mouseDownHandler = null;
index 762c916741b8dafd114c83467ab3b4ca538f3ac3..b8e14dc756b69128fff3e5bb1df5218de1d4da63 100644 (file)
@@ -28,7 +28,7 @@ public class InputEvent extends DomEvent<InputHandler> {
      * Event type for InputEvent. Represents the meta-data associated with this
      * event.
      */
-    private static final Type<InputHandler> TYPE = new Type<InputHandler>(
+    private static final Type<InputHandler> TYPE = new Type<>(
             "input", new InputEvent());
 
     protected InputEvent() {
index ba11b88831b2412afd3eaedaad09426095d0b39f..921b030f606f04c897fb5faf6b6c647f51d56443 100644 (file)
@@ -28,7 +28,7 @@ public class PointerCancelEvent extends PointerEvent<PointerCancelHandler> {
      * Event type for PointerCancelEvent. Represents the meta-data associated
      * with this event.
      */
-    private static final Type<PointerCancelHandler> TYPE = new Type<PointerCancelHandler>(
+    private static final Type<PointerCancelHandler> TYPE = new Type<>(
             EventType.PointerCancel.getNativeEventName(),
             new PointerCancelEvent());
 
index ae8fb1f6b7470af4c866599c524561ea95a5be5b..77c146cf4be26244cbc426b515be51e840c742e8 100644 (file)
@@ -28,7 +28,7 @@ public class PointerDownEvent extends PointerEvent<PointerDownHandler> {
      * Event type for PointerDownEvent. Represents the meta-data associated with
      * this event.
      */
-    private static final Type<PointerDownHandler> TYPE = new Type<PointerDownHandler>(
+    private static final Type<PointerDownHandler> TYPE = new Type<>(
             EventType.PointerDown.getNativeEventName(), new PointerDownEvent());
 
     /**
index c957ef9e7ff5eafb17b2eaad3b9ae1cb26945e6e..b58bf66e19c3ca39f69c71c726ffe44ffb8eed36 100644 (file)
@@ -28,7 +28,7 @@ public class PointerMoveEvent extends PointerEvent<PointerMoveHandler> {
      * Event type for PointerMoveEvent. Represents the meta-data associated with
      * this event.
      */
-    private static final Type<PointerMoveHandler> TYPE = new Type<PointerMoveHandler>(
+    private static final Type<PointerMoveHandler> TYPE = new Type<>(
             EventType.PointerMove.getNativeEventName(), new PointerMoveEvent());
 
     /**
index 67d64c70e8af6b95f4fc07044f647c69cedcd4fb..52588c83ed7b50ab29ff6595e1efc21082fe59a6 100644 (file)
@@ -28,7 +28,7 @@ public class PointerUpEvent extends PointerEvent<PointerUpHandler> {
      * Event type for PointerUpEvent. Represents the meta-data associated with
      * this event.
      */
-    private static final Type<PointerUpHandler> TYPE = new Type<PointerUpHandler>(
+    private static final Type<PointerUpHandler> TYPE = new Type<>(
             EventType.PointerUp.getNativeEventName(), new PointerUpEvent());
 
     /**
index 9c415f5c5d8be46bb0fba8c8267273c744126a0f..d303a549be5b9a0188b39a4fb956997c7e299e7a 100644 (file)
@@ -34,7 +34,7 @@ import com.vaadin.ui.JavaScript;
 
 @Connect(JavaScript.class)
 public class JavaScriptManagerConnector extends AbstractExtensionConnector {
-    private Set<String> currentNames = new HashSet<String>();
+    private Set<String> currentNames = new HashSet<>();
 
     @Override
     protected void init() {
@@ -59,7 +59,7 @@ public class JavaScriptManagerConnector extends AbstractExtensionConnector {
             removeCallback(name);
         }
 
-        currentNames = new HashSet<String>(newNames);
+        currentNames = new HashSet<>(newNames);
         for (String name : newNames) {
             addCallback(name);
         }
index e9aebbd583a2172dd30ec32bf3d6026c815ccb95..7217a291f8db70f7a7c3bffeaa1390a1c1db7c53 100644 (file)
@@ -30,7 +30,7 @@ public abstract class AsyncBundleLoader {
 
     private Throwable error = null;
 
-    private List<BundleLoadCallback> callbacks = new ArrayList<BundleLoadCallback>();
+    private List<BundleLoadCallback> callbacks = new ArrayList<>();
 
     private final String packageName;
 
index b6e1cc37fc0c1c9032ff0044e3e1eb8424420713..91e85305cac90360153df222c8d846c8b233f6e5 100644 (file)
@@ -143,7 +143,7 @@ public abstract class ConnectorBundleLoader {
 
     public abstract void init();
 
-    protected List<CValUiInfo> cvals = new ArrayList<CValUiInfo>();
+    protected List<CValUiInfo> cvals = new ArrayList<>();
 
     public void cval(String typeName) {
         if (!cvals.isEmpty()) {
index 35e73082e11279581332750b7fcfaf28201945a6..f8d6475ed7f0cdeb0e517af43f3be609dd79ab96 100644 (file)
@@ -260,7 +260,7 @@ public class TypeDataStore {
             throws NoDataException {
         JsArrayObject<Property> propertiesArray = getPropertiesAsArray(type);
         int size = propertiesArray.size();
-        ArrayList<Property> properties = new ArrayList<Property>(size);
+        ArrayList<Property> properties = new ArrayList<>(size);
         for (int i = 0; i < size; i++) {
             properties.add(propertiesArray.get(i));
         }
index 4fbc39b1d8b59dcb9d27b721bd6dbbdbf2ea8106..95eff8ba5e152756d45dcca602bb72bb74a23176 100644 (file)
@@ -152,7 +152,7 @@ public abstract class ClickableRenderer<T, W extends Widget>
                 return null;
             }
             Cell cell = container.getCell(e);
-            EventCellReference<T> cellReference = new EventCellReference<T>(
+            EventCellReference<T> cellReference = new EventCellReference<>(
                     grid);
             // FIXME: Section is currently always body. Might be useful for the
             // future to have an actual check.
index 77b9e4d07d50fcccc0b75923667c0167ee6eaf22..552e4eb4242360144324b6dab60745122a6eeb76 100644 (file)
@@ -306,7 +306,7 @@ public abstract class AbstractConnector
         if (handlers != null) {
             Profiler.enter("AbstractConnector.onStateChanged @OnStateChange");
 
-            HashSet<OnStateChangeMethod> invokedMethods = new HashSet<OnStateChangeMethod>();
+            HashSet<OnStateChangeMethod> invokedMethods = new HashSet<>();
 
             JsArrayString propertyNames = handlers.getKeys();
             for (int i = 0; i < propertyNames.length(); i++) {
index b3838d54f0b9246e8dbd16e2bdc034d1557774a4..703df0b96dcdd900f84bd762d8ad6f6ac4ac9abc 100644 (file)
@@ -58,7 +58,7 @@ public class ShortcutActionHandler {
         ShortcutActionHandler getShortcutActionHandler();
     }
 
-    private final ArrayList<ShortcutAction> actions = new ArrayList<ShortcutAction>();
+    private final ArrayList<ShortcutAction> actions = new ArrayList<>();
     private ApplicationConnection client;
     private String paintableId;
 
index 3eeffebaf8e08a4ccca8984f2c3c4a2b039c5dab..7b22442474b9670e9db5ae1b0b3e77f7b4ac00ae 100644 (file)
@@ -419,7 +419,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
 
     public static ArrayList<Element> getElements(Element scrolledElement2) {
         NodeList<Node> childNodes = scrolledElement2.getChildNodes();
-        ArrayList<Element> l = new ArrayList<Element>();
+        ArrayList<Element> l = new ArrayList<>();
         for (int i = 0; i < childNodes.getLength(); i++) {
             Node item = childNodes.getItem(i);
             if (item.getNodeType() == Node.ELEMENT_NODE) {
@@ -707,7 +707,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
     }
 
     public void setElements(Element[] elements) {
-        scrollableElements = new HashSet<Element>(Arrays.asList(elements));
+        scrollableElements = new HashSet<>(Arrays.asList(elements));
     }
 
     /**
index ee0ba7e6ffd22fec35a205979d74be29f0a2fe78..837b185f3532726ba4c7ddfef2e0202f086c26f0 100644 (file)
@@ -736,7 +736,7 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
         public static class SplitterMoveEvent
                 extends GwtEvent<SplitterMoveHandler> {
 
-            public static final Type<SplitterMoveHandler> TYPE = new Type<SplitterMoveHandler>();
+            public static final Type<SplitterMoveHandler> TYPE = new Type<>();
 
             private Widget splitPanel;
 
index f726eea594db93081aa3a847d86604417473c8be..73f48639f3fd31186ba66fdafa55cc03ce8be6c7 100644 (file)
@@ -42,7 +42,7 @@ public class VAccordion extends VTabsheetBase {
 
     public static final String CLASSNAME = AccordionState.PRIMARY_STYLE_NAME;
 
-    private Set<Widget> widgets = new HashSet<Widget>();
+    private Set<Widget> widgets = new HashSet<>();
 
     private StackItem openTab;
 
index 82140a12fef14526ed6f606d35bcc247c332429a..fa42637b55244ce2380fad516ff90eb70ad3c614 100644 (file)
@@ -50,13 +50,13 @@ public class VCustomLayout extends ComplexPanel {
     public static final String CLASSNAME = "v-customlayout";
 
     /** Location-name to containing element in DOM map */
-    private final HashMap<String, Element> locationToElement = new HashMap<String, Element>();
+    private final HashMap<String, Element> locationToElement = new HashMap<>();
 
     /** Location-name to contained widget map */
-    final HashMap<String, Widget> locationToWidget = new HashMap<String, Widget>();
+    final HashMap<String, Widget> locationToWidget = new HashMap<>();
 
     /** Widget to captionwrapper map */
-    private final HashMap<Widget, VCaptionWrapper> childWidgetToCaptionWrapper = new HashMap<Widget, VCaptionWrapper>();
+    private final HashMap<Widget, VCaptionWrapper> childWidgetToCaptionWrapper = new HashMap<>();
 
     /**
      * Unexecuted scripts loaded from the template.
index 615a5da2f526502f5b048e9ee8c7f41a3663b9cd..2b70569234b74c0c003650cdd1de99870d94fe9b 100644 (file)
@@ -477,10 +477,10 @@ public class VDragAndDropWrapper extends VCustomComponent
     }
 
     /** For internal use only. May be removed or replaced in the future. */
-    public List<Integer> fileIds = new ArrayList<Integer>();
+    public List<Integer> fileIds = new ArrayList<>();
 
     /** For internal use only. May be removed or replaced in the future. */
-    public List<VHtml5File> files = new ArrayList<VHtml5File>();
+    public List<VHtml5File> files = new ArrayList<>();
 
     private void queueFilePost(final int fileId, final VHtml5File file) {
         fileIds.add(fileId);
index ddd2f85d5f67b7ffae7abb511acaa4741d47b926..45037f72a8d41e110ff471d176c9b52c71998dcd 100644 (file)
@@ -206,7 +206,7 @@ public class VEmbedded extends HTML {
      * @return
      */
     public static Map<String, String> getParameters(UIDL uidl) {
-        Map<String, String> parameters = new HashMap<String, String>();
+        Map<String, String> parameters = new HashMap<>();
 
         Iterator<Object> childIterator = uidl.getChildIterator();
         while (childIterator.hasNext()) {
index 4817552baef3f77046666021d03106bfd9b414fc..650d4a05fc7835ff721bc632c25d07b1f70906ae 100644 (file)
@@ -32,7 +32,7 @@ public class VFlash extends HTML {
     protected String codetype;
     protected String standby;
     protected String archive;
-    protected Map<String, String> embedParams = new HashMap<String, String>();
+    protected Map<String, String> embedParams = new HashMap<>();
     protected boolean needsRebuild = false;
     protected String width;
     protected String height;
@@ -131,7 +131,7 @@ public class VFlash extends HTML {
         }
 
         if (!embedParams.equals(params)) {
-            embedParams = new HashMap<String, String>(params);
+            embedParams = new HashMap<>(params);
             needsRebuild = true;
         }
     }
index 013fcbbc6834956d08e7a1312ff10b6849978adc..18d7d76d74a737ab6f3fc1c52ddf9b168bcb5c77 100644 (file)
@@ -68,7 +68,7 @@ public class VFormLayout extends SimplePanel {
      */
     private String[] getStylesFromState(AbstractComponentState state,
             boolean enabled) {
-        List<String> styles = new ArrayList<String>();
+        List<String> styles = new ArrayList<>();
         if (ComponentStateUtil.hasStyles(state)) {
             for (String name : state.styles) {
                 styles.add(name);
@@ -88,8 +88,8 @@ public class VFormLayout extends SimplePanel {
         private static final int COLUMN_ERRORFLAG = 1;
         public static final int COLUMN_WIDGET = 2;
 
-        private HashMap<Widget, Caption> widgetToCaption = new HashMap<Widget, Caption>();
-        private HashMap<Widget, ErrorFlag> widgetToError = new HashMap<Widget, ErrorFlag>();
+        private HashMap<Widget, Caption> widgetToCaption = new HashMap<>();
+        private HashMap<Widget, ErrorFlag> widgetToError = new HashMap<>();
 
         public VFormLayoutTable() {
             DOM.setElementProperty(getElement(), "cellPadding", "0");
index 2d084f8ca0b23c8b3bc2c20cdcb4fc0cc39dbea0..f34c7eabde346d7f2016b6fc85c4598b0f21e0c4 100644 (file)
@@ -52,7 +52,7 @@ public class VGridLayout extends ComplexPanel {
     public ApplicationConnection client;
 
     /** For internal use only. May be removed or replaced in the future. */
-    public HashMap<Widget, Cell> widgetToCell = new HashMap<Widget, Cell>();
+    public HashMap<Widget, Cell> widgetToCell = new HashMap<>();
 
     /** For internal use only. May be removed or replaced in the future. */
     public int[] columnWidths;
@@ -586,12 +586,12 @@ public class VGridLayout extends ComplexPanel {
         }
     }
 
-    private LinkedList<SpanList> colSpans = new LinkedList<SpanList>();
-    private LinkedList<SpanList> rowSpans = new LinkedList<SpanList>();
+    private LinkedList<SpanList> colSpans = new LinkedList<>();
+    private LinkedList<SpanList> rowSpans = new LinkedList<>();
 
     private class SpanList {
         final int span;
-        List<Cell> cells = new LinkedList<Cell>();
+        List<Cell> cells = new LinkedList<>();
 
         public SpanList(int span) {
             this.span = span;
index f5e83d85502c3aa51fff1d8fedbc5de75bcd20a7..d08301ec93e4b4d187683341796f800e3f802f1e 100644 (file)
@@ -138,7 +138,7 @@ public class VMenuBar extends SimpleFocusablePanel
 
     public VMenuBar(boolean subMenu, VMenuBar parentMenu) {
 
-        items = new ArrayList<CustomMenuItem>();
+        items = new ArrayList<>();
         popup = null;
         visibleChildMenu = null;
         this.subMenu = subMenu;
@@ -928,7 +928,7 @@ public class VMenuBar extends SimpleFocusablePanel
             }
 
             String currentStyles = super.getStyleName();
-            List<String> customStyles = new ArrayList<String>();
+            List<String> customStyles = new ArrayList<>();
             for (String style : currentStyles.split(" ")) {
                 if (!style.isEmpty() && !style.startsWith(primaryStyleName)) {
                     customStyles.add(style);
@@ -1594,7 +1594,7 @@ public class VMenuBar extends SimpleFocusablePanel
 
             return item.getElement();
         } else {
-            Queue<CustomMenuItem> submenuItems = new LinkedList<CustomMenuItem>();
+            Queue<CustomMenuItem> submenuItems = new LinkedList<>();
             for (CustomMenuItem item : getItems()) {
                 if (isItemNamed(item, subPart)) {
                     return item.getElement();
index 1b530fe2379f084cfe7ff2c65fd4aa2baed3b847..6042ff11d62f4e3be35426dfff44ed6f949555c8 100644 (file)
@@ -81,7 +81,7 @@ public class VNotification extends VOverlay {
     private static final int Z_INDEX_BASE = 20000;
     public static final String STYLE_SYSTEM = "system";
 
-    private static final ArrayList<VNotification> notifications = new ArrayList<VNotification>();
+    private static final ArrayList<VNotification> notifications = new ArrayList<>();
 
     private boolean infiniteDelay = false;
     private int hideDelay = 0;
@@ -464,7 +464,7 @@ public class VNotification extends VOverlay {
 
     public void addEventListener(EventListener listener) {
         if (listeners == null) {
-            listeners = new ArrayList<EventListener>();
+            listeners = new ArrayList<>();
         }
         listeners.add(listener);
     }
index e8499a96c1835bcd3ec61f005b41d3988ccb7254..296cde28bcaeb5feae3285735913084d3c5f50ad 100644 (file)
@@ -240,7 +240,7 @@ public class VPopupView extends HTML
 
         private boolean hasHadMouseOver = false;
         private boolean hideOnMouseOut = true;
-        private final Set<Element> activeChildren = new HashSet<Element>();
+        private final Set<Element> activeChildren = new HashSet<>();
 
         private ShortcutActionHandler shortcutActionHandler;
 
index 4ec65e889bd23c6860fee32dc18ba4505e81f7b0..d52362afcced899bc411deab112dab1e7f36e0db 100644 (file)
@@ -35,9 +35,9 @@ public abstract class VTabsheetBase extends ComplexPanel implements HasEnabled {
     protected ApplicationConnection client;
 
     /** For internal use only. May be removed or replaced in the future. */
-    protected final ArrayList<String> tabKeys = new ArrayList<String>();
+    protected final ArrayList<String> tabKeys = new ArrayList<>();
     /** For internal use only. May be removed or replaced in the future. */
-    protected Set<String> disabledTabKeys = new HashSet<String>();
+    protected Set<String> disabledTabKeys = new HashSet<>();
 
     /** For internal use only. May be removed or replaced in the future. */
     protected int activeTabIndex = 0;
index c3d9e7eddf5b546b36c9471cb542a537604c72a1..e9767a6baca43744f8bec8455d7d030d11916b5f 100644 (file)
@@ -77,7 +77,7 @@ import com.vaadin.shared.ui.window.WindowRole;
 public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
         ScrollHandler, KeyDownHandler, FocusHandler, BlurHandler, Focusable {
 
-    private static ArrayList<VWindow> windowOrder = new ArrayList<VWindow>();
+    private static ArrayList<VWindow> windowOrder = new ArrayList<>();
 
     private static boolean orderingDefered;
 
index 211d5ab322c6bf13ca505e57b4ba41cde7810ed3..7d281186c4ffa1c6516c661af65262b23757689c 100644 (file)
@@ -52,7 +52,7 @@ public class VDragEvent {
 
     private int id;
 
-    private HashMap<String, Object> dropDetails = new HashMap<String, Object>();
+    private HashMap<String, Object> dropDetails = new HashMap<>();
 
     private Element elementOver;
 
index 5f25f935ce8fc426517e7680a6f34934659a303f..646853bca1c473eac4868d454ea2c9b7267b3334 100644 (file)
@@ -48,7 +48,7 @@ public class VLazyInitItemIdentifiers extends VAcceptCriterion {
 
                 @Override
                 public void handleResponse(boolean accepted, UIDL response) {
-                    hashSet = new HashSet<String>();
+                    hashSet = new HashSet<>();
                     String[] stringArrayAttribute = response
                             .getStringArrayAttribute("allowedIds");
                     for (int i = 0; i < stringArrayAttribute.length; i++) {
index 098811bb463f4d9e7b753e3f2081e6b7f494dd17..804d9c1bcb452d2e40e23686f76efd52f11c932d 100644 (file)
@@ -30,7 +30,7 @@ public class VTransferable {
 
     private ComponentConnector component;
 
-    private final Map<String, Object> variables = new HashMap<String, Object>();
+    private final Map<String, Object> variables = new HashMap<>();
 
     /**
      * Returns the component from which the transferable is created (eg. a tree
index 25908910cbad00551607cb39ca5ee8c8f1ba81b4..038d58afd0e65d5e3a5a1d8b42c8ca3f12d8d350 100644 (file)
@@ -63,7 +63,7 @@ public class DragAndDropWrapperConnector extends CustomComponentConnector
                     String receiverUrl = uidl.getStringVariable(fileId);
                     fileId = fileId.substring(4);
                     if (getWidget().fileIdToReceiver == null) {
-                        getWidget().fileIdToReceiver = new HashMap<String, String>();
+                        getWidget().fileIdToReceiver = new HashMap<>();
                     }
                     if ("".equals(receiverUrl)) {
                         Integer id = Integer.parseInt(fileId);
index eccec238772fd796bec1196c907b83f55b373963..ba1d79c776b7854ddbf521f23191365fe4be97fd 100644 (file)
@@ -121,7 +121,7 @@ public class FormLayoutConnector extends AbstractLayoutConnector
                 targetWidth = Math.max(0, targetWidth);
 
                 if (oldMaxWidths == null) {
-                    oldMaxWidths = new HashMap<ComponentConnector, String>();
+                    oldMaxWidths = new HashMap<>();
                 }
 
                 for (ComponentConnector child : getChildComponents()) {
index e80a6ee77f2930a13b21ba7926ec6ed99ee8dd63..03c7693979ec88a10300917e7f53410b2c228c2f 100644 (file)
@@ -725,7 +725,7 @@ public class LayoutDependencyTree {
     public Collection<ComponentConnector> getMeasureTargets() {
         JsArrayString targetIds = getMeasureTargetsJsArray();
         int length = targetIds.length();
-        ArrayList<ComponentConnector> targets = new ArrayList<ComponentConnector>(
+        ArrayList<ComponentConnector> targets = new ArrayList<>(
                 length);
         ConnectorMap connectorMap = ConnectorMap.get(connection);
 
index d410a07305560eeeb14e97984a5340c8f964e7e5..61ecb051d95fcc413141f36f8f6ca4d88d63ea22 100644 (file)
@@ -76,7 +76,7 @@ public class MenuBar extends Widget implements PopupListener {
     private final Element table;
     private final Element outer;
 
-    private final ArrayList<MenuItem> items = new ArrayList<MenuItem>();
+    private final ArrayList<MenuItem> items = new ArrayList<>();
     private MenuBar parentMenu;
     private PopupPanel popup;
     private MenuItem selectedItem;
index 6977ec7d61abad69564dddea49f49ecd0df96bc0..cc8e3872ad66fdf2d4cf5edd0c7bc59e03c81e3f 100644 (file)
@@ -102,8 +102,8 @@ public class MenuBarConnector extends AbstractComponentConnector
 
         UIDL uidlItems = uidl.getChildUIDL(1);
         Iterator<Object> itr = uidlItems.getChildIterator();
-        Stack<Iterator<Object>> iteratorStack = new Stack<Iterator<Object>>();
-        Stack<VMenuBar> menuStack = new Stack<VMenuBar>();
+        Stack<Iterator<Object>> iteratorStack = new Stack<>();
+        Stack<VMenuBar> menuStack = new Stack<>();
         VMenuBar currentMenu = getWidget();
 
         while (itr.hasNext()) {
index 8a98f95e0cbd0cb86cef1f4fa91ac27e14e3c948..1148ab90ad444638be29f894c84f2b5ee2e79797 100644 (file)
@@ -47,7 +47,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
 
     protected boolean definedHeight = false;
 
-    private Map<Widget, Slot> widgetToSlot = new HashMap<Widget, Slot>();
+    private Map<Widget, Slot> widgetToSlot = new HashMap<>();
 
     private Element expandWrapper;
 
index 1ee6e9b9f7d2412dccc7d7641e3ce3a75fc01354..f0b42f76d96f31d79d5719991b12d937aa3d6edb 100644 (file)
@@ -40,7 +40,7 @@ public class PopupViewConnector extends AbstractHasComponentsConnector
 
     private boolean centerAfterLayout = false;
 
-    private final List<HandlerRegistration> handlerRegistration = new ArrayList<HandlerRegistration>();
+    private final List<HandlerRegistration> handlerRegistration = new ArrayList<>();
 
     @Override
     protected void init() {
index 896ba821308658132d636cfc633881e22aed87ec..06380eef28a2c9a0e1b23c203914a8a2125f7d6b 100644 (file)
@@ -38,7 +38,7 @@ public class VisibilityChangeEvent extends GwtEvent<VisibilityChangeHandler> {
 
     public static Type<VisibilityChangeHandler> getType() {
         if (TYPE == null) {
-            TYPE = new Type<VisibilityChangeHandler>();
+            TYPE = new Type<>();
         }
         return TYPE;
     }
index fe9c119829708dece62aa2ce7b71a503473cbbbc..ec6b86880bb69ca6323f2942334d1b3d69e8058f 100644 (file)
@@ -133,7 +133,7 @@ public abstract class AbstractSplitPanelConnector extends
         if (ComponentStateUtil.hasStyles(getState())) {
             getWidget().componentStyleNames = getState().styles;
         } else {
-            getWidget().componentStyleNames = new LinkedList<String>();
+            getWidget().componentStyleNames = new LinkedList<>();
         }
 
         // Splitter updates
index a5301abdf1fef766deb60fa2eb12a4ade0fa4ef9..1bd721787c07238a76cc8260ed53d8e726468779 100644 (file)
@@ -56,7 +56,7 @@ public abstract class TabsheetBaseConnector
         getWidget().setEnabled(isEnabled());
 
         // Widgets in the TabSheet before update
-        ArrayList<Widget> oldWidgets = new ArrayList<Widget>();
+        ArrayList<Widget> oldWidgets = new ArrayList<>();
         for (Iterator<Widget> iterator = getWidget()
                 .getWidgetIterator(); iterator.hasNext();) {
             oldWidgets.add(iterator.next());
index 7c0df8761d6e87fd9b544a865dcf965ab978ba6b..26f99bfb94da0cfb517378c8c14e203f01183593 100644 (file)
@@ -625,7 +625,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
      * @return
      */
     public List<WindowConnector> getSubWindows() {
-        ArrayList<WindowConnector> windows = new ArrayList<WindowConnector>();
+        ArrayList<WindowConnector> windows = new ArrayList<>();
         for (ComponentConnector child : getChildComponents()) {
             if (child instanceof WindowConnector) {
                 windows.add((WindowConnector) child);
index f5602f673ea2540c8454774fa9ec699195943f01..c105b91a6c6a3427c6897ac97b6b1eff17a67f9e 100644 (file)
@@ -25,7 +25,7 @@ import com.google.gwt.event.shared.GwtEvent;
  */
 public class WindowMoveEvent extends GwtEvent<WindowMoveHandler> {
 
-    private static final Type<WindowMoveHandler> TYPE = new Type<WindowMoveHandler>();
+    private static final Type<WindowMoveHandler> TYPE = new Type<>();
 
     private final int newX;
     private final int newY;
index a8bcf4d8099caffb126f57a7dba4c2e6e1d02536..0105560a002323b9a028c3cae2c73e9572ee4f97 100644 (file)
@@ -71,7 +71,7 @@ public class FlyweightRow implements Row {
 
         private CellIterator(final Collection<FlyweightCell> cells,
                 final boolean attached) {
-            this.cells = new ArrayList<FlyweightCell>(cells);
+            this.cells = new ArrayList<>(cells);
             cellsAttached = attached;
         }
 
@@ -142,7 +142,7 @@ public class FlyweightRow implements Row {
     private int row;
     private TableRowElement element;
     private double[] columnWidths = null;
-    private final List<FlyweightCell> cells = new ArrayList<FlyweightCell>();
+    private final List<FlyweightCell> cells = new ArrayList<>();
 
     public void setup(final TableRowElement e, final int row,
             double[] columnWidths) {
index a36b591fd076d17606ec34d7b449f0d283108b1a..0bd2ed0b9c8c12f8ada1a72a434067a2a4e7a0ff 100644 (file)
@@ -30,7 +30,7 @@ public class RowVisibilityChangeEvent
     /**
      * The type of this event.
      */
-    public static final Type<RowVisibilityChangeHandler> TYPE = new Type<RowVisibilityChangeHandler>();
+    public static final Type<RowVisibilityChangeHandler> TYPE = new Type<>();
 
     private final Range visibleRows;
 
index d6657b08d36b4eaec94dc3c7373e22809b069655..846b0ce7230f8ed3b4829f8fb22d23c6fe84e7c4 100644 (file)
@@ -29,7 +29,7 @@ public class RowHeightChangedEvent extends GwtEvent<RowHeightChangedHandler> {
     /**
      * Handler type.
      */
-    public final static Type<RowHeightChangedHandler> TYPE = new Type<RowHeightChangedHandler>();
+    public final static Type<RowHeightChangedHandler> TYPE = new Type<>();
 
     public static final Type<RowHeightChangedHandler> getType() {
         return TYPE;
index 8441a16bc52e15ac69d272eb30986730d6e92077..b1ed8757d20b46000af09701c1a905067a9e3182 100644 (file)
@@ -27,7 +27,7 @@ import com.vaadin.shared.Range;
 public class DataAvailableEvent extends GwtEvent<DataAvailableHandler> {
 
     private Range rowsAvailable;
-    public static final Type<DataAvailableHandler> TYPE = new Type<DataAvailableHandler>();
+    public static final Type<DataAvailableHandler> TYPE = new Type<>();
 
     public DataAvailableEvent(Range rowsAvailable) {
         this.rowsAvailable = rowsAvailable;
index 3fb266586bd15cda28820f295cb94fd3b2b87c56..a77f4ec86aebda7e8979128b48438785bb6991dd 100644 (file)
@@ -38,7 +38,7 @@ public class EventCellReference<T> extends CellReference<T> {
     private TableCellElement element;
 
     public EventCellReference(Grid<T> grid) {
-        super(new RowReference<T>(grid));
+        super(new RowReference<>(grid));
     }
 
     /**
index 584e7651279300f2778acc60eb04d11560b6237b..b5b6f42f3a04ac438887a27a7060f58704fa962c 100644 (file)
@@ -344,7 +344,7 @@ public class ListDataSource<T> implements DataSource<T> {
         if (datasource == null) {
             throw new IllegalArgumentException("datasource cannot be null");
         }
-        ds = new ArrayList<T>(datasource);
+        ds = new ArrayList<>(datasource);
         wrapper = new ListWrapper();
     }
 
@@ -358,9 +358,9 @@ public class ListDataSource<T> implements DataSource<T> {
      */
     public ListDataSource(T... rows) {
         if (rows == null) {
-            ds = new ArrayList<T>();
+            ds = new ArrayList<>();
         } else {
-            ds = new ArrayList<T>(Arrays.asList(rows));
+            ds = new ArrayList<>(Arrays.asList(rows));
         }
         wrapper = new ListWrapper();
     }
index ad68e94b870246ce856dbd80ca4bd0c7d4f2a1ce..14cb2e6523def89140e6c25e21630238dcae955d 100644 (file)
@@ -50,7 +50,7 @@ public class ListSorter<T> {
         }
 
         this.grid = grid;
-        comparators = new HashMap<Grid.Column<?, T>, Comparator<?>>();
+        comparators = new HashMap<>();
 
         sortHandlerRegistration = grid.addSortHandler(new SortHandler<T>() {
             @Override
index d1e5e6fb990dea75c6114746063de9c995bc3c65..72c0eb5878de61f7b59b4ab989ea4cf657e11251 100644 (file)
@@ -31,7 +31,7 @@ public class ColumnReorderEvent<T> extends GwtEvent<ColumnReorderHandler<T>> {
     /**
      * Handler type.
      */
-    private final static Type<ColumnReorderHandler<?>> TYPE = new Type<ColumnReorderHandler<?>>();
+    private final static Type<ColumnReorderHandler<?>> TYPE = new Type<>();
 
     public static final Type<ColumnReorderHandler<?>> getType() {
         return TYPE;
index bedec89519d89db4510d2576888464df1f351014..abd369b175c1fd9f4a13e939afa2b07bd88504ed 100644 (file)
@@ -32,7 +32,7 @@ public class ColumnResizeEvent<T> extends GwtEvent<ColumnResizeHandler<T>> {
     /**
      * Handler type.
      */
-    private final static Type<ColumnResizeHandler<?>> TYPE = new Type<ColumnResizeHandler<?>>();
+    private final static Type<ColumnResizeHandler<?>> TYPE = new Type<>();
 
     private Column<?, T> column;
 
index 7033c4c24b10b1bf3c6990f190b4d79efdcfdd75..5c7b88cc9195f1928a604faedd154065d183dc7f 100644 (file)
@@ -31,7 +31,7 @@ import com.vaadin.client.widgets.Grid.Column;
 public class ColumnVisibilityChangeEvent<T>
         extends GwtEvent<ColumnVisibilityChangeHandler<T>> {
 
-    private final static Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<ColumnVisibilityChangeHandler<?>>();
+    private final static Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<>();
 
     public static final Type<ColumnVisibilityChangeHandler<?>> getType() {
         return TYPE;
index bb31a4d6a04953eba3f1e61236bc7dd9b5684f96..86c8e66af29223ff5c1ad9d1c6d80220cbddcc5e 100644 (file)
@@ -27,7 +27,7 @@ public class GridEnabledEvent extends GwtEvent<GridEnabledHandler> {
     /**
      * The type of this event
      */
-    public static final Type<GridEnabledHandler> TYPE = new Type<GridEnabledHandler>();
+    public static final Type<GridEnabledHandler> TYPE = new Type<>();
     private final boolean enabled;
 
     public GridEnabledEvent(boolean enabled) {
index 37e1125bb4b96c904fa10c2da27428ffe136179c..97cae2f890baaf0dc6a7c5d032a6743431b62749 100644 (file)
@@ -26,7 +26,7 @@ import com.google.gwt.event.shared.GwtEvent;
 public class ScrollEvent extends GwtEvent<ScrollHandler> {
 
     /** The type of this event */
-    public static final Type<ScrollHandler> TYPE = new Type<ScrollHandler>();
+    public static final Type<ScrollHandler> TYPE = new Type<>();
 
     @Override
     public Type<ScrollHandler> getAssociatedType() {
index 09885064aefc236cdee6cf4fcf7eece9b8f9f9de..a21adfd2a8c938a25611b46b993a9d0254578555 100644 (file)
@@ -30,7 +30,7 @@ public class SelectAllEvent<T> extends GwtEvent<SelectAllHandler<T>> {
     /**
      * Handler type.
      */
-    private final static Type<SelectAllHandler<?>> TYPE = new Type<SelectAllHandler<?>>();;
+    private final static Type<SelectAllHandler<?>> TYPE = new Type<>();;
 
     private SelectionModel.Multi<T> selectionModel;
 
index 293a0a62d48d352c75cfc2aa2cf17d5a24726fe0..2ae8b0579d232767d10b6c71e1251504e30c6e3c 100644 (file)
@@ -639,7 +639,7 @@ public class MultiSelectionRenderer<T>
 
     @Override
     public Collection<String> getConsumedEvents() {
-        final HashSet<String> events = new HashSet<String>();
+        final HashSet<String> events = new HashSet<>();
 
         /*
          * this column's first interest is only to attach a NativePreventHandler
index 9d016d263422c79a0f3c51ee6291551224995aa2..8219b8998ce2993ad774f3466d9f41db67326162 100644 (file)
@@ -32,7 +32,7 @@ import com.vaadin.client.widgets.Grid;
 @SuppressWarnings("rawtypes")
 public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
 
-    private static final Type<SelectionHandler> eventType = new Type<SelectionHandler>();
+    private static final Type<SelectionHandler> eventType = new Type<>();
 
     private final Grid<T> grid;
     private final List<T> added;
@@ -92,13 +92,13 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
         this.batched = batched;
 
         if (added != null) {
-            this.added = new ArrayList<T>(added);
+            this.added = new ArrayList<>(added);
         } else {
             this.added = Collections.emptyList();
         }
 
         if (removed != null) {
-            this.removed = new ArrayList<T>(removed);
+            this.removed = new ArrayList<>(removed);
         } else {
             this.removed = Collections.emptyList();
         }
index 213bd24b67f7f060e50689f6d964473243b36568..3c395560a7695a880bad8a0fb17996175bde0276 100644 (file)
@@ -40,8 +40,8 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
     private Grid<T> grid;
 
     private boolean batchStarted = false;
-    private final LinkedHashSet<RowHandle<T>> selectionBatch = new LinkedHashSet<RowHandle<T>>();
-    private final LinkedHashSet<RowHandle<T>> deselectionBatch = new LinkedHashSet<RowHandle<T>>();
+    private final LinkedHashSet<RowHandle<T>> selectionBatch = new LinkedHashSet<>();
+    private final LinkedHashSet<RowHandle<T>> deselectionBatch = new LinkedHashSet<>();
 
     /* Event handling for selection with space key */
     private SpaceSelectHandler<T> spaceSelectHandler;
@@ -49,7 +49,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
     public SelectionModelMulti() {
         grid = null;
         renderer = null;
-        selectedRows = new LinkedHashSet<RowHandle<T>>();
+        selectedRows = new LinkedHashSet<>();
     }
 
     @Override
@@ -74,8 +74,8 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
 
         this.grid = grid;
         if (this.grid != null) {
-            spaceSelectHandler = new SpaceSelectHandler<T>(grid);
-            this.renderer = new MultiSelectionRenderer<T>(grid);
+            spaceSelectHandler = new SpaceSelectHandler<>(grid);
+            this.renderer = new MultiSelectionRenderer<>(grid);
         } else {
             spaceSelectHandler.removeHandler();
             spaceSelectHandler = null;
@@ -107,7 +107,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
             @SuppressWarnings("unchecked")
             final LinkedHashSet<RowHandle<T>> selectedRowsClone = (LinkedHashSet<RowHandle<T>>) selectedRows
                     .clone();
-            SelectionEvent<T> event = new SelectionEvent<T>(grid, null,
+            SelectionEvent<T> event = new SelectionEvent<>(grid, null,
                     getSelectedRows(), isBeingBatchSelected());
             selectedRows.clear();
 
@@ -129,7 +129,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
             throw new IllegalArgumentException("Rows cannot be null");
         }
 
-        Set<T> added = new LinkedHashSet<T>();
+        Set<T> added = new LinkedHashSet<>();
 
         for (T row : rows) {
             RowHandle<T> handle = grid.getDataSource().getHandle(row);
@@ -139,7 +139,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
         }
 
         if (added.size() > 0) {
-            grid.fireEvent(new SelectionEvent<T>(grid, added, null,
+            grid.fireEvent(new SelectionEvent<>(grid, added, null,
                     isBeingBatchSelected()));
 
             return true;
@@ -153,7 +153,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
             throw new IllegalArgumentException("Rows cannot be null");
         }
 
-        Set<T> removed = new LinkedHashSet<T>();
+        Set<T> removed = new LinkedHashSet<>();
 
         for (T row : rows) {
             RowHandle<T> handle = grid.getDataSource().getHandle(row);
@@ -163,7 +163,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
         }
 
         if (removed.size() > 0) {
-            grid.fireEvent(new SelectionEvent<T>(grid, null, removed,
+            grid.fireEvent(new SelectionEvent<>(grid, null, removed,
                     isBeingBatchSelected()));
             return true;
         }
@@ -206,7 +206,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
 
     @Override
     public Collection<T> getSelectedRows() {
-        Set<T> selected = new LinkedHashSet<T>();
+        Set<T> selected = new LinkedHashSet<>();
         for (RowHandle<T> handle : selectedRows) {
             selected.add(handle.getRow());
         }
@@ -244,7 +244,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
         }
         deselectionBatch.clear();
 
-        grid.fireEvent(new SelectionEvent<T>(grid, added, removed,
+        grid.fireEvent(new SelectionEvent<>(grid, added, removed,
                 isBeingBatchSelected()));
     }
 
@@ -264,7 +264,7 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
     }
 
     private ArrayList<T> rowHandlesToRows(Collection<RowHandle<T>> rowHandles) {
-        ArrayList<T> rows = new ArrayList<T>(rowHandles.size());
+        ArrayList<T> rows = new ArrayList<>(rowHandles.size());
         for (RowHandle<T> handle : rowHandles) {
             rows.add(handle.getRow());
         }
index 1e4d4538a89db50a16a5d771dc515a038d053430..1214e3f72bfaf2f199c27586b8cad6fd1d512c14 100644 (file)
@@ -66,8 +66,8 @@ public class SelectionModelSingle<T> extends AbstractRowHandleSelectionModel<T>
 
         this.grid = grid;
         if (this.grid != null) {
-            spaceSelectHandler = new SpaceSelectHandler<T>(grid);
-            clickSelectHandler = new ClickSelectHandler<T>(grid);
+            spaceSelectHandler = new SpaceSelectHandler<>(grid);
+            clickSelectHandler = new ClickSelectHandler<>(grid);
             updateHandlerDeselectAllowed();
         } else {
             spaceSelectHandler.removeHandler();
@@ -86,7 +86,7 @@ public class SelectionModelSingle<T> extends AbstractRowHandleSelectionModel<T>
 
         T removed = getSelectedRow();
         if (selectByHandle(grid.getDataSource().getHandle(row))) {
-            grid.fireEvent(new SelectionEvent<T>(grid, row, removed, false));
+            grid.fireEvent(new SelectionEvent<>(grid, row, removed, false));
 
             return true;
         }
@@ -102,7 +102,7 @@ public class SelectionModelSingle<T> extends AbstractRowHandleSelectionModel<T>
 
         if (isSelected(row)) {
             deselectByHandle(selectedRow);
-            grid.fireEvent(new SelectionEvent<T>(grid, null, row, false));
+            grid.fireEvent(new SelectionEvent<>(grid, null, row, false));
             return true;
         }
 
index cc42c61851ae35319b99996cd65b3beacd30d35e..043bcfa4c742cc12d9c5be9218df0165afc47e02 100644 (file)
@@ -141,7 +141,7 @@ public class Sort {
      */
     public List<SortOrder> build() {
 
-        List<SortOrder> order = new ArrayList<SortOrder>(count);
+        List<SortOrder> order = new ArrayList<>(count);
 
         Sort s = this;
         for (int i = count - 1; i >= 0; --i) {
index 6ccb88c13478431644b419a6f5ac5c015dbe5701..660b635eb658b8dfbe4f93ced1e234b9d98959b8 100644 (file)
@@ -29,7 +29,7 @@ import com.vaadin.client.widgets.Grid;
  */
 public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
 
-    private static final Type<SortHandler<?>> TYPE = new Type<SortHandler<?>>();
+    private static final Type<SortHandler<?>> TYPE = new Type<>();
 
     private final Grid<T> grid;
     private final List<SortOrder> order;
index 35978b7cb0a413e6091ae05235896e2fe5efbb8c..564496e00a52b11a42e69841708bcee09bfab59e 100644 (file)
@@ -388,7 +388,7 @@ public class Escalator extends Widget
 
             // The object to deal with one direction scrolling
             private class Movement {
-                final List<Double> speeds = new ArrayList<Double>();
+                final List<Double> speeds = new ArrayList<>();
                 final ScrollbarBundle scroll;
                 double position, offset, velocity, prevPos, prevTime, delta;
                 boolean run, vertical;
@@ -1277,7 +1277,7 @@ public class Escalator extends Widget
                      * potentially need to set the widths for the cells for the
                      * first time.
                      */
-                    Map<Integer, Double> colWidths = new HashMap<Integer, Double>();
+                    Map<Integer, Double> colWidths = new HashMap<>();
                     for (int i = 0; i < getColumnConfiguration()
                             .getColumnCount(); i++) {
                         Double width = Double.valueOf(
@@ -1307,7 +1307,7 @@ public class Escalator extends Widget
                 final int visualIndex, final int numberOfRows) {
             assert isAttached() : "Can't paint rows if Escalator is not attached";
 
-            final List<TableRowElement> addedRows = new ArrayList<TableRowElement>();
+            final List<TableRowElement> addedRows = new ArrayList<>();
 
             if (numberOfRows < 1) {
                 return addedRows;
@@ -2325,7 +2325,7 @@ public class Escalator extends Widget
          *
          * @see #sortDomElements()
          */
-        private final LinkedList<TableRowElement> visualRowOrder = new LinkedList<TableRowElement>();
+        private final LinkedList<TableRowElement> visualRowOrder = new LinkedList<>();
 
         /**
          * The logical index of the topmost row.
@@ -2792,7 +2792,7 @@ public class Escalator extends Widget
                  * it's faster to just move idx[9] to the beginning.
                  */
 
-                final List<TableRowElement> removedRows = new ArrayList<TableRowElement>(
+                final List<TableRowElement> removedRows = new ArrayList<>(
                         visualSourceRange.length());
                 for (int i = 0; i < visualSourceRange.length(); i++) {
                     final TableRowElement tr = visualRowOrder
@@ -3756,7 +3756,7 @@ public class Escalator extends Widget
              * the first child.
              */
 
-            List<TableRowElement> orderedBodyRows = new ArrayList<TableRowElement>(
+            List<TableRowElement> orderedBodyRows = new ArrayList<>(
                     visualRowOrder);
             Map<Integer, SpacerContainer.SpacerImpl> spacers = body.spacerContainer
                     .getSpacers();
@@ -4011,7 +4011,7 @@ public class Escalator extends Widget
             }
         }
 
-        private final List<Column> columns = new ArrayList<Column>();
+        private final List<Column> columns = new ArrayList<>();
         private int frozenColumns = 0;
 
         /*
@@ -4209,7 +4209,7 @@ public class Escalator extends Widget
             if (header.getRowCount() > 0 || body.getRowCount() > 0
                     || footer.getRowCount() > 0) {
 
-                Map<Integer, Double> colWidths = new HashMap<Integer, Double>();
+                Map<Integer, Double> colWidths = new HashMap<>();
                 Double width = Double.valueOf(Column.DEFAULT_COLUMN_WIDTH_PX);
                 for (int i = index; i < index + numberOfColumns; i++) {
                     Integer col = Integer.valueOf(i);
@@ -4747,7 +4747,7 @@ public class Escalator extends Widget
             }
         }
 
-        private final TreeMap<Integer, SpacerImpl> rowIndexToSpacer = new TreeMap<Integer, SpacerImpl>();
+        private final TreeMap<Integer, SpacerImpl> rowIndexToSpacer = new TreeMap<>();
 
         private SpacerUpdater spacerUpdater = SpacerUpdater.NULL;
 
@@ -4885,7 +4885,7 @@ public class Escalator extends Widget
         }
 
         public Map<Integer, SpacerImpl> getSpacers() {
-            return new HashMap<Integer, SpacerImpl>(rowIndexToSpacer);
+            return new HashMap<>(rowIndexToSpacer);
         }
 
         /**
@@ -4908,7 +4908,7 @@ public class Escalator extends Widget
         @SuppressWarnings("boxing")
         public Collection<SpacerImpl> getSpacersForRowAndAfter(
                 int logicalRowIndex) {
-            return new ArrayList<SpacerImpl>(
+            return new ArrayList<>(
                     rowIndexToSpacer.tailMap(logicalRowIndex, true).values());
         }
 
@@ -4936,7 +4936,7 @@ public class Escalator extends Widget
         public Collection<SpacerImpl> getSpacersAfterPx(final double px,
                 final SpacerInclusionStrategy strategy) {
 
-            ArrayList<SpacerImpl> spacers = new ArrayList<SpacerImpl>(
+            ArrayList<SpacerImpl> spacers = new ArrayList<>(
                     rowIndexToSpacer.values());
 
             for (int i = 0; i < spacers.size(); i++) {
@@ -5344,8 +5344,8 @@ public class Escalator extends Widget
         /**
          * A map containing cached values of an element's current top position.
          */
-        private final Map<Element, Double> elementTopPositionMap = new HashMap<Element, Double>();
-        private final Map<Element, Double> elementLeftPositionMap = new HashMap<Element, Double>();
+        private final Map<Element, Double> elementTopPositionMap = new HashMap<>();
+        private final Map<Element, Double> elementLeftPositionMap = new HashMap<>();
 
         public void set(final Element e, final double x, final double y) {
             assert e != null : "Element was null";
index 85c6d489428b881452b75a0e619f9d11cc2aaa0d..92dc0d704329c3b8c028c67fdc8ff1aefcb41a8c 100644 (file)
@@ -441,14 +441,14 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
          */
         public abstract static class StaticRow<CELLTYPE extends StaticCell> {
 
-            private Map<Column<?, ?>, CELLTYPE> cells = new HashMap<Column<?, ?>, CELLTYPE>();
+            private Map<Column<?, ?>, CELLTYPE> cells = new HashMap<>();
 
             private StaticSection<?> section;
 
             /**
              * Map from set of spanned columns to cell meta data.
              */
-            private Map<Set<Column<?, ?>>, CELLTYPE> cellGroups = new HashMap<Set<Column<?, ?>>, CELLTYPE>();
+            private Map<Set<Column<?, ?>>, CELLTYPE> cellGroups = new HashMap<>();
 
             /**
              * A custom style name for the row or null if none is set.
@@ -496,7 +496,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                             "You can't merge less than 2 columns together.");
                 }
 
-                HashSet<Column<?, ?>> columnGroup = new HashSet<Column<?, ?>>();
+                HashSet<Column<?, ?>> columnGroup = new HashSet<>();
                 // NOTE: this doesn't care about hidden columns, those are
                 // filtered in calculateColspans()
                 for (Column<?, ?> column : columns) {
@@ -590,7 +590,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
             private boolean checkMergedCellIsContinuous(
                     Set<Column<?, ?>> mergedCell) {
                 // no matter if hidden or not, just check for continuous order
-                final List<Column<?, ?>> columnOrder = new ArrayList<Column<?, ?>>(
+                final List<Column<?, ?>> columnOrder = new ArrayList<>(
                         section.grid.getColumns());
 
                 if (!columnOrder.containsAll(mergedCell)) {
@@ -660,7 +660,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
              */
             void detach() {
                 // Avoid calling detach twice for a merged cell
-                HashSet<CELLTYPE> cells = new HashSet<CELLTYPE>();
+                HashSet<CELLTYPE> cells = new HashSet<>();
                 for (Column<?, ?> column : getSection().grid.getColumns()) {
                     cells.add(getCell(column));
                 }
@@ -672,7 +672,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
 
         private Grid<?> grid;
 
-        private List<ROWTYPE> rows = new ArrayList<ROWTYPE>();
+        private List<ROWTYPE> rows = new ArrayList<>();
 
         private boolean visible = true;
 
@@ -1336,8 +1336,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
         // Should only be added to the DOM when there's a message to show
         private DivElement message = DivElement.as(DOM.createDiv());
 
-        private Map<Column<?, T>, Widget> columnToWidget = new HashMap<Column<?, T>, Widget>();
-        private List<HandlerRegistration> focusHandlers = new ArrayList<HandlerRegistration>();
+        private Map<Column<?, T>, Widget> columnToWidget = new HashMap<>();
+        private List<HandlerRegistration> focusHandlers = new ArrayList<>();
 
         private boolean enabled = false;
         private State state = State.INACTIVE;
@@ -1432,7 +1432,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
         };
 
         /** A set of all the columns that display an error flag. */
-        private final Set<Column<?, T>> columnErrors = new HashSet<Grid.Column<?, T>>();
+        private final Set<Column<?, T>> columnErrors = new HashSet<>();
         private boolean buffered = true;
 
         /** Original position of editor */
@@ -1628,7 +1628,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                 throw new IllegalStateException(
                         "Cannot cancel edit: editor is not in edit mode");
             }
-            handler.cancel(new EditorRequestImpl<T>(grid, rowIndex,
+            handler.cancel(new EditorRequestImpl<>(grid, rowIndex,
                     focusedColumnIndex, null));
             doCancel();
         }
@@ -1674,7 +1674,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
             state = State.SAVING;
             setButtonsEnabled(false);
             saveTimeout.schedule(SAVE_TIMEOUT_MS);
-            EditorRequest<T> request = new EditorRequestImpl<T>(grid, rowIndex,
+            EditorRequest<T> request = new EditorRequestImpl<>(grid, rowIndex,
                     focusedColumnIndex, saveRequestCallback);
             handler.save(request);
             updateSelectionCheckboxesAsNeeded(true);
@@ -1738,7 +1738,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
             if (state == State.ACTIVATING) {
                 state = State.BINDING;
                 bindTimeout.schedule(BIND_TIMEOUT_MS);
-                EditorRequest<T> request = new EditorRequestImpl<T>(grid,
+                EditorRequest<T> request = new EditorRequestImpl<>(grid,
                         rowIndex, columnIndex, bindRequestCallback);
                 handler.bind(request);
                 grid.getEscalator().setScrollLocked(Direction.VERTICAL,
@@ -2269,7 +2269,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
             extends KeyEvent<HANDLER> {
 
         private Grid<?> grid;
-        private final Type<HANDLER> associatedType = new Type<HANDLER>(
+        private final Type<HANDLER> associatedType = new Type<>(
                 getBrowserEventType(), this);
         private final CellReference<?> targetCell;
 
@@ -2329,7 +2329,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
 
         private Grid<?> grid;
         private final CellReference<?> targetCell;
-        private final Type<HANDLER> associatedType = new Type<HANDLER>(
+        private final Type<HANDLER> associatedType = new Type<>(
                 getBrowserEventType(), this);
 
         public AbstractGridMouseEvent(Grid<?> grid,
@@ -2407,7 +2407,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
      */
     private static final double DETAILS_ROW_INITIAL_HEIGHT = 50;
 
-    private EventCellReference<T> eventCell = new EventCellReference<T>(this);
+    private EventCellReference<T> eventCell = new EventCellReference<>(this);
     private GridKeyDownEvent keyDown = new GridKeyDownEvent(this, eventCell);
     private GridKeyUpEvent keyUp = new GridKeyUpEvent(this, eventCell);
     private GridKeyPressEvent keyPress = new GridKeyPressEvent(this, eventCell);
@@ -2881,7 +2881,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                             public void onValueChange(
                                     ValueChangeEvent<Boolean> event) {
                                 if (event.getValue()) {
-                                    fireEvent(new SelectAllEvent<T>(model));
+                                    fireEvent(new SelectAllEvent<>(model));
                                     selected = true;
                                 } else {
                                     model.deselectAll();
@@ -3231,7 +3231,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
 
             /* Step 1: Apply all column widths as they are. */
 
-            Map<Integer, Double> selfWidths = new LinkedHashMap<Integer, Double>();
+            Map<Integer, Double> selfWidths = new LinkedHashMap<>();
             List<Column<?, T>> columns = getVisibleColumns();
             for (int index = 0; index < columns.size(); index++) {
                 selfWidths.put(index, columns.get(index).getWidth());
@@ -3245,7 +3245,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
              * violated, fix it.
              */
 
-            Map<Integer, Double> constrainedWidths = new LinkedHashMap<Integer, Double>();
+            Map<Integer, Double> constrainedWidths = new LinkedHashMap<>();
             for (int index = 0; index < columns.size(); index++) {
                 Column<?, T> column = columns.get(index);
 
@@ -3270,9 +3270,9 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
             boolean defaultExpandRatios = true;
             int totalRatios = 0;
             double reservedPixels = 0;
-            final Set<Column<?, T>> columnsToExpand = new HashSet<Column<?, T>>();
-            List<Column<?, T>> nonFixedColumns = new ArrayList<Column<?, T>>();
-            Map<Integer, Double> columnSizes = new HashMap<Integer, Double>();
+            final Set<Column<?, T>> columnsToExpand = new HashSet<>();
+            List<Column<?, T>> nonFixedColumns = new ArrayList<>();
+            Map<Integer, Double> columnSizes = new HashMap<>();
             final List<Column<?, T>> visibleColumns = getVisibleColumns();
 
             /*
@@ -3535,7 +3535,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
 
         private static final String STRIPE_CLASSNAME = "stripe";
 
-        private final Map<Element, Widget> elementToWidgetMap = new HashMap<Element, Widget>();
+        private final Map<Element, Widget> elementToWidgetMap = new HashMap<>();
 
         @Override
         public void init(Spacer spacer) {
@@ -3917,7 +3917,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
     private final class ColumnHider {
 
         /** Map from columns to their hiding toggles, component might change */
-        private HashMap<Column<?, T>, MenuItem> columnToHidingToggleMap = new HashMap<Grid.Column<?, T>, MenuItem>();
+        private HashMap<Column<?, T>, MenuItem> columnToHidingToggleMap = new HashMap<>();
 
         /**
          * When column is being hidden with a toggle, do not refresh toggles for
@@ -4016,7 +4016,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
     /**
      * List of columns in the grid. Order defines the visible order.
      */
-    private List<Column<?, T>> columns = new ArrayList<Column<?, T>>();
+    private List<Column<?, T>> columns = new ArrayList<>();
 
     /**
      * The datasource currently in use. <em>Note:</em> it is <code>null</code>
@@ -4040,7 +4040,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
      * Current sort order. The (private) sort() method reads this list to
      * determine the order in which to present rows.
      */
-    private List<SortOrder> sortOrder = new ArrayList<SortOrder>();
+    private List<SortOrder> sortOrder = new ArrayList<>();
 
     private Renderer<Boolean> selectColumnRenderer = null;
 
@@ -4098,7 +4098,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
     private DetailsGenerator detailsGenerator = DetailsGenerator.NULL;
     private GridSpacerUpdater gridSpacerUpdater = new GridSpacerUpdater();
     /** A set keeping track of the indices of all currently open details */
-    private Set<Integer> visibleDetails = new HashSet<Integer>();
+    private Set<Integer> visibleDetails = new HashSet<>();
 
     private boolean columnReorderingAllowed;
 
@@ -4148,7 +4148,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
          * Map of possible drop positions for the column and the corresponding
          * column index.
          */
-        private final TreeMap<Double, Integer> possibleDropPositions = new TreeMap<Double, Integer>();
+        private final TreeMap<Double, Integer> possibleDropPositions = new TreeMap<>();
         /**
          * Makes sure that drag cancel doesn't cause anything unwanted like sort
          */
@@ -4347,7 +4347,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                     && latestColumnDropIndex != (draggedColumnIndex
                             + colspan)) {
                 List<Column<?, T>> columns = getColumns();
-                List<Column<?, T>> reordered = new ArrayList<Column<?, T>>();
+                List<Column<?, T>> reordered = new ArrayList<>();
                 if (draggedColumnIndex < latestColumnDropIndex) {
                     reordered.addAll(columns.subList(0, draggedColumnIndex));
                     reordered.addAll(
@@ -4475,8 +4475,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
             int leftBound = -1;
             int rightBound = getColumnCount() + 1;
 
-            final HashSet<Integer> unavailableColumnDropIndices = new HashSet<Integer>();
-            final List<StaticRow<?>> rows = new ArrayList<StaticRow<?>>();
+            final HashSet<Integer> unavailableColumnDropIndices = new HashSet<>();
+            final List<StaticRow<?>> rows = new ArrayList<>();
             rows.addAll(header.getRows());
             rows.addAll(footer.getRows());
             for (StaticRow<?> row : rows) {
@@ -5062,7 +5062,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                 grid.header.updateColSpans();
                 grid.footer.updateColSpans();
                 scheduleColumnWidthRecalculator();
-                this.grid.fireEvent(new ColumnVisibilityChangeEvent<T>(this,
+                this.grid.fireEvent(new ColumnVisibilityChangeEvent<>(this,
                         hidden, userOriginated));
             }
         }
@@ -5725,7 +5725,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
 
                                         if (c.getWidth() < 0) {
                                             c.setWidth(c.getWidthActual());
-                                            fireEvent(new ColumnResizeEvent<T>(
+                                            fireEvent(new ColumnResizeEvent<>(
                                                     c));
                                         }
                                     }
@@ -5736,7 +5736,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
 
                                 @Override
                                 public void onComplete() {
-                                    fireEvent(new ColumnResizeEvent<T>(col));
+                                    fireEvent(new ColumnResizeEvent<>(col));
 
                                     WidgetUtil.setTextSelectionEnabled(
                                             getElement(), true);
@@ -5818,7 +5818,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                 escalator.getColumnConfiguration().setColumnWidth(colIndex,
                         minWidth);
 
-                fireEvent(new ColumnResizeEvent<T>(column));
+                fireEvent(new ColumnResizeEvent<>(column));
             }
         }
 
@@ -6228,7 +6228,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
         column.reapplyWidth();
 
         // Sink all renderer events
-        Set<String> events = new HashSet<String>();
+        Set<String> events = new HashSet<>();
         events.addAll(getConsumedEventsForRenderer(column.getRenderer()));
 
         if (column.isHidable()) {
@@ -6321,7 +6321,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
      */
     public List<Column<?, T>> getColumns() {
         return Collections
-                .unmodifiableList(new ArrayList<Column<?, T>>(columns));
+                .unmodifiableList(new ArrayList<>(columns));
     }
 
     /**
@@ -6333,7 +6333,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
      * @return A unmodifiable list of the currently visible columns in the grid
      */
     public List<Column<?, T>> getVisibleColumns() {
-        ArrayList<Column<?, T>> visible = new ArrayList<Column<?, T>>();
+        ArrayList<Column<?, T>> visible = new ArrayList<>();
         for (Column<?, T> c : columns) {
             if (!c.isHidden()) {
                 visible.add(c);
@@ -6748,7 +6748,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                         int oldSize = body.getRowCount();
 
                         // Hide all details.
-                        Set<Integer> oldDetails = new HashSet<Integer>(
+                        Set<Integer> oldDetails = new HashSet<>(
                                 visibleDetails);
                         for (int i : oldDetails) {
                             setDetailsVisible(i, false);
@@ -7122,7 +7122,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
     }
 
     private Set<String> getConsumedEventsForRenderer(Renderer<?> renderer) {
-        Set<String> events = new HashSet<String>();
+        Set<String> events = new HashSet<>();
         if (renderer instanceof ComplexRenderer) {
             Collection<String> consumedEvents = ((ComplexRenderer<?>) renderer)
                     .getConsumedEvents();
@@ -7294,7 +7294,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
             w = editor.getWidget(getColumn(editor.focusedColumnIndex));
         }
 
-        EditorDomEvent<T> editorEvent = new EditorDomEvent<T>(event,
+        EditorDomEvent<T> editorEvent = new EditorDomEvent<>(event,
                 getEventCell(), w);
 
         return getEditor().getEventHandler().handleEvent(editorEvent);
@@ -7365,8 +7365,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
     private Point rowEventTouchStartingPoint;
     private CellStyleGenerator<T> cellStyleGenerator;
     private RowStyleGenerator<T> rowStyleGenerator;
-    private RowReference<T> rowReference = new RowReference<T>(this);
-    private CellReference<T> cellReference = new CellReference<T>(rowReference);
+    private RowReference<T> rowReference = new RowReference<>(this);
+    private CellReference<T> cellReference = new CellReference<>(rowReference);
     private RendererCellReference rendererCellReference = new RendererCellReference(
             (RowReference<Object>) rowReference);
 
@@ -8187,7 +8187,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
      */
     private void sort(boolean userOriginated) {
         refreshHeader();
-        fireEvent(new SortEvent<T>(this,
+        fireEvent(new SortEvent<>(this,
                 Collections.unmodifiableList(sortOrder), userOriginated));
     }
 
@@ -8269,7 +8269,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
         // Trigger ComplexRenderer.destroy for old content
         conf.removeColumns(0, conf.getColumnCount());
 
-        List<Column<?, T>> newOrder = new ArrayList<Column<?, T>>();
+        List<Column<?, T>> newOrder = new ArrayList<>();
         if (selectionColumn != null) {
             newOrder.add(selectionColumn);
         }
@@ -8547,7 +8547,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
 
     @Override
     protected void onDetach() {
-        Set<Integer> details = new HashSet<Integer>(visibleDetails);
+        Set<Integer> details = new HashSet<>(visibleDetails);
         for (int row : details) {
             setDetailsVisible(row, false);
         }
@@ -8957,7 +8957,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
         if (container != null) {
             Cell cell = container.getCell(element);
             if (cell != null) {
-                EventCellReference<T> cellRef = new EventCellReference<T>(this);
+                EventCellReference<T> cellRef = new EventCellReference<>(this);
                 cellRef.set(cell, getSectionFromContainer(container));
                 return cellRef;
             }
index 0b1d317a0560d2ea3a748b5e1e25d24072b890fd..e6ce34b8a7e78a7ca978bb8fcdb8939a1a5683c4 100644 (file)
@@ -175,7 +175,7 @@ public class Overlay extends PopupPanel {
      */
     private static final int POPUP_PANEL_ANIMATION_DURATION = 200;
 
-    private List<Command> runOnClose = new ArrayList<Command>();
+    private List<Command> runOnClose = new ArrayList<>();
 
     public Overlay() {
         super();
index 912abc412abc361de5fe509623e09f6d3cccd3e6..1329b7fdc9f98884a16da1b626b46e43c92e218c 100755 (executable)
@@ -12,7 +12,7 @@ public class DateTimeServiceTest {
 
     final long MILLISECONDS_PER_DAY = 24 * 3600 * 1000;
 
-    static Map<Date, Integer> isoWeekNumbers = new HashMap<Date, Integer>();
+    static Map<Date, Integer> isoWeekNumbers = new HashMap<>();
     static {
         isoWeekNumbers.put(getDate(2005, 02, 02), 5);
 
index b3a4f24ebbbf6d0c82d2b11d6e072181263daf37..7d9bf530cea9d003d54f45f8843dea5f3ec32104 100644 (file)
@@ -32,7 +32,7 @@ public class ListDataSourceTest {
     @Test
     public void testDataSourceConstruction() throws Exception {
 
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
 
         assertEquals(4, ds.size());
         assertEquals(0, (int) ds.getRow(0));
@@ -40,7 +40,7 @@ public class ListDataSourceTest {
         assertEquals(2, (int) ds.getRow(2));
         assertEquals(3, (int) ds.getRow(3));
 
-        ds = new ListDataSource<Integer>(Arrays.asList(0, 1, 2, 3));
+        ds = new ListDataSource<>(Arrays.asList(0, 1, 2, 3));
 
         assertEquals(4, ds.size());
         assertEquals(0, (int) ds.getRow(0));
@@ -52,7 +52,7 @@ public class ListDataSourceTest {
     @Test
     public void testListAddOperation() throws Exception {
 
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
 
         DataChangeHandler handler = EasyMock
                 .createNiceMock(DataChangeHandler.class);
@@ -76,7 +76,7 @@ public class ListDataSourceTest {
     @Test
     public void testListAddAllOperation() throws Exception {
 
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
 
         DataChangeHandler handler = EasyMock
                 .createNiceMock(DataChangeHandler.class);
@@ -102,7 +102,7 @@ public class ListDataSourceTest {
     @Test
     public void testListRemoveOperation() throws Exception {
 
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
 
         DataChangeHandler handler = EasyMock
                 .createNiceMock(DataChangeHandler.class);
@@ -124,7 +124,7 @@ public class ListDataSourceTest {
     @Test
     public void testListRemoveAllOperation() throws Exception {
 
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
 
         DataChangeHandler handler = EasyMock
                 .createNiceMock(DataChangeHandler.class);
@@ -144,7 +144,7 @@ public class ListDataSourceTest {
     @Test
     public void testListClearOperation() throws Exception {
 
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
 
         DataChangeHandler handler = EasyMock
                 .createNiceMock(DataChangeHandler.class);
@@ -162,19 +162,19 @@ public class ListDataSourceTest {
 
     @Test(expected = IllegalStateException.class)
     public void testFetchingNonExistantItem() {
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
         ds.ensureAvailability(5, 1);
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testUnsupportedIteratorRemove() {
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(0, 1, 2, 3);
+        ListDataSource<Integer> ds = new ListDataSource<>(0, 1, 2, 3);
         ds.asList().iterator().remove();
     }
 
     @Test
     public void sortColumn() {
-        ListDataSource<Integer> ds = new ListDataSource<Integer>(3, 4, 2, 3, 1);
+        ListDataSource<Integer> ds = new ListDataSource<>(3, 4, 2, 3, 1);
 
         // TODO Should be simplified to sort(). No point in providing these
         // trivial comparators.
index 7fb25bf9af7baf068476667d6ae1e6530da52787..b82b3ff4e7165c1f33b5aaab50bb6d51246ad286 100644 (file)
@@ -62,7 +62,7 @@ public interface Result<R> extends Serializable {
      */
     public static <R> Result<R> error(String message) {
         Objects.requireNonNull(message, "message cannot be null");
-        return new SimpleResult<R>(null, message);
+        return new SimpleResult<>(null, message);
     }
 
     /**
index 63d152b001932d0f1fb2699e6789d87213a76e3b..fe082149e998a6d1b21bda80c0e7d2678a0f3ccf 100644 (file)
@@ -140,7 +140,7 @@ public class Sort implements Serializable {
             ++count;
         }
 
-        List<SortOrder> order = new ArrayList<SortOrder>(count);
+        List<SortOrder> order = new ArrayList<>(count);
 
         s = this;
         do {
index 98b1359337a0e9acb9ca3cce63af1a2d7e094e6e..b221d175117b3dcd82a7d6d54450fb1f812ffbf8 100644 (file)
@@ -98,7 +98,7 @@ public class ActionManager
     @Override
     public <T extends Action & Action.Listener> void addAction(T action) {
         if (ownActions == null) {
-            ownActions = new LinkedHashSet<Action>();
+            ownActions = new LinkedHashSet<>();
         }
         if (ownActions.add(action)) {
             requestRepaint();
@@ -123,7 +123,7 @@ public class ActionManager
         if (actionHandler != null) {
 
             if (actionHandlers == null) {
-                actionHandlers = new LinkedHashSet<Handler>();
+                actionHandlers = new LinkedHashSet<>();
             }
 
             if (actionHandlers.add(actionHandler)) {
@@ -165,7 +165,7 @@ public class ActionManager
          * removed but still exist on client side
          */
         if (!actions.isEmpty() || clientHasActions) {
-            actionMapper = new KeyMapper<Action>();
+            actionMapper = new KeyMapper<>();
 
             paintTarget.addVariable((VariableOwner) viewer, "action", "");
             paintTarget.startTag("actions");
@@ -240,7 +240,7 @@ public class ActionManager
     }
 
     private LinkedHashSet<Action> getActionSet(Object target, Object sender) {
-        LinkedHashSet<Action> actions = new LinkedHashSet<Action>();
+        LinkedHashSet<Action> actions = new LinkedHashSet<>();
         if (ownActions != null) {
             actions.addAll(ownActions);
 
index 9e8051fed374aecbe18840eac0ffcda9a5ba7622..9ef6c8123bffe0cb308e6dc4fb2df91f246dc6bf 100644 (file)
@@ -52,7 +52,7 @@ public class EventRouter implements MethodEventSource {
     @Override
     public void addListener(Class<?> eventType, Object object, Method method) {
         if (listenerList == null) {
-            listenerList = new LinkedHashSet<ListenerMethod>();
+            listenerList = new LinkedHashSet<>();
         }
         listenerList.add(new ListenerMethod(eventType, object, method));
     }
@@ -66,7 +66,7 @@ public class EventRouter implements MethodEventSource {
     public void addListener(Class<?> eventType, Object object,
             String methodName) {
         if (listenerList == null) {
-            listenerList = new LinkedHashSet<ListenerMethod>();
+            listenerList = new LinkedHashSet<>();
         }
         listenerList.add(new ListenerMethod(eventType, object, methodName));
     }
@@ -232,7 +232,7 @@ public class EventRouter implements MethodEventSource {
      *         are found.
      */
     public Collection<?> getListeners(Class<?> eventType) {
-        List<Object> listeners = new ArrayList<Object>();
+        List<Object> listeners = new ArrayList<>();
         if (listenerList != null) {
             for (ListenerMethod lm : listenerList) {
                 if (lm.isOrExtendsType(eventType)) {
index f22f499893df66513ff83c4a7549c4d08f59679b..b5a4d587e6c36b50e786d2fc8839d4b82a282b05 100644 (file)
@@ -37,8 +37,8 @@ public class SelectionEvent extends EventObject {
     public SelectionEvent(Object source, Collection<Object> oldSelection,
             Collection<Object> newSelection) {
         super(source);
-        this.oldSelection = new LinkedHashSet<Object>(oldSelection);
-        this.newSelection = new LinkedHashSet<Object>(newSelection);
+        this.oldSelection = new LinkedHashSet<>(oldSelection);
+        this.newSelection = new LinkedHashSet<>(newSelection);
     }
 
     /**
@@ -79,7 +79,7 @@ public class SelectionEvent extends EventObject {
         if (set2.isEmpty()) {
             return set1;
         } else {
-            LinkedHashSet<T> set = new LinkedHashSet<T>(set1);
+            LinkedHashSet<T> set = new LinkedHashSet<>(set1);
             set.removeAll(set2);
             return set;
         }
index fad6adf2eb1e5447dd39e4bb6f01ff40a510c4de..4da28176fc8d3afe01eb7a9d25cb5d1365f563a6 100644 (file)
@@ -27,7 +27,7 @@ import com.vaadin.ui.Component;
  * @since 6.3
  */
 public class TransferableImpl implements Transferable {
-    private Map<String, Object> rawVariables = new HashMap<String, Object>();
+    private Map<String, Object> rawVariables = new HashMap<>();
     private Component sourceComponent;
 
     public TransferableImpl(Component sourceComponent,
index cce6029159e4118037b0a56dcc2cc62b4e4457e0..42bff9c007d5959b9c1e5571928d8035749c7ed3 100644 (file)
@@ -30,7 +30,7 @@ import com.vaadin.shared.MouseEventDetails;
 @SuppressWarnings("serial")
 public class TargetDetailsImpl implements TargetDetails {
 
-    private HashMap<String, Object> data = new HashMap<String, Object>();
+    private HashMap<String, Object> data = new HashMap<>();
     private DropTarget dropTarget;
 
     protected TargetDetailsImpl(Map<String, Object> rawDropData) {
index 5704457f72c5259a3c4e1062ac78abda5627287a..13e3b4c2e7ce7ab3aa8d057385ff58f5946b1107 100644 (file)
@@ -374,8 +374,8 @@ public class Navigator implements Serializable {
     private NavigationStateManager stateManager;
     private ViewDisplay display;
     private View currentView = null;
-    private List<ViewChangeListener> listeners = new LinkedList<ViewChangeListener>();
-    private List<ViewProvider> providers = new LinkedList<ViewProvider>();
+    private List<ViewChangeListener> listeners = new LinkedList<>();
+    private List<ViewProvider> providers = new LinkedList<>();
     private String currentNavigationState = null;
     private ViewProvider errorProvider;
 
@@ -722,7 +722,7 @@ public class Navigator implements Serializable {
         // a copy of the listener list is needed to avoid
         // ConcurrentModificationException as a listener can add/remove
         // listeners
-        for (ViewChangeListener l : new ArrayList<ViewChangeListener>(
+        for (ViewChangeListener l : new ArrayList<>(
                 listeners)) {
             if (!l.beforeViewChange(event)) {
                 return false;
@@ -786,7 +786,7 @@ public class Navigator implements Serializable {
         // a copy of the listener list is needed to avoid
         // ConcurrentModificationException as a listener can add/remove
         // listeners
-        for (ViewChangeListener l : new ArrayList<ViewChangeListener>(
+        for (ViewChangeListener l : new ArrayList<>(
                 listeners)) {
             l.afterViewChange(event);
         }
index 676256fb5d628adc69f1058d7808b5b00f02a58a..ea969bea2b0e11240b0feae02c979adc80ffd0e9 100644 (file)
@@ -60,13 +60,13 @@ public abstract class AbstractClientConnector
      * A map from client to server RPC interface class name to the RPC call
      * manager that handles incoming RPC calls for that interface.
      */
-    private Map<String, ServerRpcManager<?>> rpcManagerMap = new HashMap<String, ServerRpcManager<?>>();
+    private Map<String, ServerRpcManager<?>> rpcManagerMap = new HashMap<>();
 
     /**
      * A map from server to client RPC interface class to the RPC proxy that
      * sends ourgoing RPC calls for that interface.
      */
-    private Map<Class<?>, ClientRpc> rpcProxyMap = new HashMap<Class<?>, ClientRpc>();
+    private Map<Class<?>, ClientRpc> rpcProxyMap = new HashMap<>();
 
     /**
      * Shared state object to be communicated from the server to the client when
@@ -79,11 +79,11 @@ public abstract class AbstractClientConnector
     /**
      * Pending RPC method invocations to be sent.
      */
-    private ArrayList<ClientMethodInvocation> pendingInvocations = new ArrayList<ClientMethodInvocation>();
+    private ArrayList<ClientMethodInvocation> pendingInvocations = new ArrayList<>();
 
     private String connectorId;
 
-    private ArrayList<Extension> extensions = new ArrayList<Extension>();
+    private ArrayList<Extension> extensions = new ArrayList<>();
 
     /**
      * The EventRouter used for the event model.
@@ -92,7 +92,7 @@ public abstract class AbstractClientConnector
 
     private ErrorHandler errorHandler = null;
 
-    private static final ConcurrentHashMap<Class<? extends AbstractClientConnector>, Class<? extends SharedState>> stateTypeCache = new ConcurrentHashMap<Class<? extends AbstractClientConnector>, Class<? extends SharedState>>();
+    private static final ConcurrentHashMap<Class<? extends AbstractClientConnector>, Class<? extends SharedState>> stateTypeCache = new ConcurrentHashMap<>();
 
     @Override
     public void addAttachListener(AttachListener listener) {
@@ -170,7 +170,7 @@ public abstract class AbstractClientConnector
     protected <T extends ServerRpc> void registerRpc(T implementation,
             Class<T> rpcInterfaceType) {
         rpcManagerMap.put(rpcInterfaceType.getName(),
-                new ServerRpcManager<T>(implementation, rpcInterfaceType));
+                new ServerRpcManager<>(implementation, rpcInterfaceType));
     }
 
     /**
@@ -425,7 +425,7 @@ public abstract class AbstractClientConnector
             return Collections.emptyList();
         } else {
             List<ClientMethodInvocation> result = pendingInvocations;
-            pendingInvocations = new ArrayList<ClientMethodInvocation>();
+            pendingInvocations = new ArrayList<>();
             return Collections.unmodifiableList(result);
         }
     }
index 0bd00bae8603e60e64b7f2a822040a6cdc014d00..491462b53d0174715d34d6354fdf26397b566cff 100644 (file)
@@ -63,7 +63,7 @@ public abstract class AbstractErrorMessage implements ErrorMessage {
      */
     private ErrorLevel level = ErrorLevel.ERROR;
 
-    private List<ErrorMessage> causes = new ArrayList<ErrorMessage>();
+    private List<ErrorMessage> causes = new ArrayList<>();
 
     protected AbstractErrorMessage(String message) {
         this.message = message;
index 359f878ad1bcb0fe911f121f1ef9df5390d9e74a..84ee3c2334f712b00a68164a673251a6dc9ba1ee 100644 (file)
@@ -303,7 +303,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
                 .getBootstrapResponse();
 
         if (vaadinService.isStandalone(request)) {
-            Map<String, Object> headers = new LinkedHashMap<String, Object>();
+            Map<String, Object> headers = new LinkedHashMap<>();
             Document document = Document.createShell("");
             BootstrapPageResponse pageResponse = new BootstrapPageResponse(this,
                     request, context.getSession(), context.getUIClass(),
index dcf47ba438cd632c5d70288c6d2c3195becf81af..241aea20787f4cbcd842f34038c107c3652dde6c 100644 (file)
@@ -70,7 +70,7 @@ public class ComponentSizeValidator implements Serializable {
                     parent.addError(error);
                 } else {
                     if (errors == null) {
-                        errors = new LinkedList<InvalidLayout>();
+                        errors = new LinkedList<>();
                     }
                     errors.add(error);
                 }
@@ -168,7 +168,7 @@ public class ComponentSizeValidator implements Serializable {
         private final boolean invalidHeight;
         private final boolean invalidWidth;
 
-        private final Vector<InvalidLayout> subErrors = new Vector<InvalidLayout>();
+        private final Vector<InvalidLayout> subErrors = new Vector<>();
 
         public InvalidLayout(Component component, boolean height,
                 boolean width) {
@@ -281,7 +281,7 @@ public class ComponentSizeValidator implements Serializable {
 
     private static Stack<ComponentInfo> getHeightAttributes(
             Component component) {
-        Stack<ComponentInfo> attributes = new Stack<ComponentInfo>();
+        Stack<ComponentInfo> attributes = new Stack<>();
         attributes
                 .add(new ComponentInfo(component, getHeightString(component)));
         Component parent = component.getParent();
@@ -296,7 +296,7 @@ public class ComponentSizeValidator implements Serializable {
 
     private static Stack<ComponentInfo> getWidthAttributes(
             Component component) {
-        Stack<ComponentInfo> attributes = new Stack<ComponentInfo>();
+        Stack<ComponentInfo> attributes = new Stack<>();
         attributes.add(new ComponentInfo(component, getWidthString(component)));
         Component parent = component.getParent();
         attributes.add(new ComponentInfo(parent, getWidthString(parent)));
@@ -581,9 +581,9 @@ public class ComponentSizeValidator implements Serializable {
 
     }
 
-    private static Map<Object, FileLocation> creationLocations = new HashMap<Object, FileLocation>();
-    private static Map<Object, FileLocation> widthLocations = new HashMap<Object, FileLocation>();
-    private static Map<Object, FileLocation> heightLocations = new HashMap<Object, FileLocation>();
+    private static Map<Object, FileLocation> creationLocations = new HashMap<>();
+    private static Map<Object, FileLocation> widthLocations = new HashMap<>();
+    private static Map<Object, FileLocation> heightLocations = new HashMap<>();
 
     public static class FileLocation implements Serializable {
         public String method;
index d67fbda8c226991c9a9bb9914cc4b02e6f3b508f..a0a1334135bf920e721e111ff73caef198e026fe 100644 (file)
@@ -148,7 +148,7 @@ public class DownloadStream implements Serializable {
      */
     public void setParameter(String name, String value) {
         if (params == null) {
-            params = new HashMap<String, String>();
+            params = new HashMap<>();
         }
         params.put(name, value);
     }
index aa3bccdb93ad0b583c9c4b79f094c59c45dba464..93a43829b33f2f1ce1930bbdec3d688fa6a2ce2b 100644 (file)
@@ -428,7 +428,7 @@ public class GAEVaadinServlet extends VaadinServlet {
                     getLogger().log(Level.INFO,
                             "Vaadin cleanup deleting {0} expired Vaadin sessions.",
                             entities.size());
-                    List<Key> keys = new ArrayList<Key>();
+                    List<Key> keys = new ArrayList<>();
                     for (Entity e : entities) {
                         keys.add(e.getKey());
                     }
@@ -448,7 +448,7 @@ public class GAEVaadinServlet extends VaadinServlet {
                     getLogger().log(Level.INFO,
                             "Vaadin cleanup deleting {0} expired appengine sessions.",
                             entities.size());
-                    List<Key> keys = new ArrayList<Key>();
+                    List<Key> keys = new ArrayList<>();
                     for (Entity e : entities) {
                         keys.add(e.getKey());
                     }
index 62f3d330146a0dc38cba081e020622bac6dd2217..975d5475d14c442de87c21d240972b7bf37ace59 100644 (file)
@@ -49,15 +49,15 @@ public class GlobalResourceHandler implements RequestHandler {
     /**
      * Used to detect when a resource is no longer used by any connector.
      */
-    private final Map<Resource, Set<ClientConnector>> resourceUsers = new HashMap<Resource, Set<ClientConnector>>();
+    private final Map<Resource, Set<ClientConnector>> resourceUsers = new HashMap<>();
     /**
      * Used to find the resources that might not be needed any more when a
      * connector is unregistered.
      */
-    private final Map<ClientConnector, Set<Resource>> usedResources = new HashMap<ClientConnector, Set<Resource>>();
+    private final Map<ClientConnector, Set<Resource>> usedResources = new HashMap<>();
 
-    private final Map<ConnectorResource, String> legacyResourceKeys = new HashMap<ConnectorResource, String>();
-    private final Map<String, ConnectorResource> legacyResources = new HashMap<String, ConnectorResource>();
+    private final Map<ConnectorResource, String> legacyResourceKeys = new HashMap<>();
+    private final Map<String, ConnectorResource> legacyResources = new HashMap<>();
     private int nextLegacyId = 0;
 
     // APP/global/[uiid]/[type]/[id]
@@ -173,7 +173,7 @@ public class GlobalResourceHandler implements RequestHandler {
     private <K, V> void ensureInSet(Map<K, Set<V>> map, K key, V value) {
         Set<V> set = map.get(key);
         if (set == null) {
-            set = new HashSet<V>();
+            set = new HashSet<>();
             map.put(key, set);
         }
         set.add(value);
index f4b855638541a0e345c3f474cc15f610fa3c15ea..cdd42c19da8090ac0fd703da4faa74d261dfff6a 100644 (file)
@@ -49,7 +49,7 @@ public class JavaScriptCallbackHelper implements Serializable {
             JavaScriptCallbackRpc.class, "call", String.class, JsonArray.class);
     private AbstractClientConnector connector;
 
-    private Map<String, JavaScriptFunction> callbacks = new HashMap<String, JavaScriptFunction>();
+    private Map<String, JavaScriptFunction> callbacks = new HashMap<>();
     private JavaScriptCallbackRpc javascriptCallbackRpc;
 
     public JavaScriptCallbackHelper(AbstractClientConnector connector) {
@@ -109,7 +109,7 @@ public class JavaScriptCallbackHelper implements Serializable {
                 .getRpcInterfaces();
         String interfaceName = rpcInterfaceType.getName();
         if (!rpcInterfaces.containsKey(interfaceName)) {
-            Set<String> methodNames = new HashSet<String>();
+            Set<String> methodNames = new HashSet<>();
 
             for (Method method : rpcInterfaceType.getMethods()) {
                 methodNames.add(method.getName());
index 2dae3ed03ee7ad7712a29c0a6ae8a95236ea3db7..adf3e029ee1d63b2ddd95af578c92db685d1fd88 100644 (file)
@@ -137,7 +137,7 @@ public class JsonCodec implements Serializable {
         public static Collection<FieldProperty> find(Class<?> type)
                 throws IntrospectionException {
             Field[] fields = type.getFields();
-            Collection<FieldProperty> properties = new ArrayList<FieldProperty>(
+            Collection<FieldProperty> properties = new ArrayList<>(
                     fields.length);
             for (Field field : fields) {
                 if (!Modifier.isStatic(field.getModifiers())) {
@@ -178,7 +178,7 @@ public class JsonCodec implements Serializable {
 
         public static Collection<MethodProperty> find(Class<?> type)
                 throws IntrospectionException {
-            Collection<MethodProperty> properties = new ArrayList<MethodProperty>();
+            Collection<MethodProperty> properties = new ArrayList<>();
 
             for (PropertyDescriptor pd : Introspector.getBeanInfo(type)
                     .getPropertyDescriptors()) {
@@ -204,17 +204,17 @@ public class JsonCodec implements Serializable {
      * happens to process Vaadin requests, so it must be protected from
      * corruption caused by concurrent access.
      */
-    private static ConcurrentMap<Class<?>, Collection<BeanProperty>> typePropertyCache = new ConcurrentHashMap<Class<?>, Collection<BeanProperty>>();
+    private static ConcurrentMap<Class<?>, Collection<BeanProperty>> typePropertyCache = new ConcurrentHashMap<>();
 
-    private static Map<Class<?>, String> typeToTransportType = new HashMap<Class<?>, String>();
+    private static Map<Class<?>, String> typeToTransportType = new HashMap<>();
 
     /**
      * Note! This does not contain primitives.
      * <p>
      */
-    private static Map<String, Class<?>> transportTypeToType = new HashMap<String, Class<?>>();
+    private static Map<String, Class<?>> transportTypeToType = new HashMap<>();
 
-    private static Map<Class<?>, JSONSerializer<?>> customSerializers = new HashMap<Class<?>, JSONSerializer<?>>();
+    private static Map<Class<?>, JSONSerializer<?>> customSerializers = new HashMap<>();
     static {
         customSerializers.put(Date.class, new DateSerializer());
     }
@@ -464,7 +464,7 @@ public class JsonCodec implements Serializable {
             // See #8906.
             JsonArray jsonArray = (JsonArray) jsonMap;
             if (jsonArray.length() == 0) {
-                return new HashMap<Object, Object>();
+                return new HashMap<>();
             }
         }
 
@@ -499,7 +499,7 @@ public class JsonCodec implements Serializable {
 
         assert (keys.length() == values.length());
 
-        Map<Object, Object> map = new HashMap<Object, Object>(
+        Map<Object, Object> map = new HashMap<>(
                 keys.length() * 2);
         for (int i = 0; i < keys.length(); i++) {
             Object key = decodeInternalOrCustomType(keyType, keys.get(i),
@@ -515,7 +515,7 @@ public class JsonCodec implements Serializable {
 
     private static Map<Object, Object> decodeConnectorMap(Type valueType,
             JsonObject jsonMap, ConnectorTracker connectorTracker) {
-        Map<Object, Object> map = new HashMap<Object, Object>();
+        Map<Object, Object> map = new HashMap<>();
 
         for (String key : jsonMap.keys()) {
             Object value = decodeInternalOrCustomType(valueType,
@@ -531,7 +531,7 @@ public class JsonCodec implements Serializable {
 
     private static Map<Object, Object> decodeStringMap(Type valueType,
             JsonObject jsonMap, ConnectorTracker connectorTracker) {
-        Map<Object, Object> map = new HashMap<Object, Object>();
+        Map<Object, Object> map = new HashMap<>();
 
         for (String key : jsonMap.keys()) {
             Object value = decodeInternalOrCustomType(valueType,
@@ -590,7 +590,7 @@ public class JsonCodec implements Serializable {
             boolean restrictToInternalTypes, JsonArray jsonArray,
             ConnectorTracker connectorTracker) {
         int arrayLength = jsonArray.length();
-        List<Object> list = new ArrayList<Object>(arrayLength);
+        List<Object> list = new ArrayList<>(arrayLength);
         for (int i = 0; i < arrayLength; ++i) {
             // each entry always has two elements: type and value
             JsonValue encodedValue = jsonArray.get(i);
@@ -604,7 +604,7 @@ public class JsonCodec implements Serializable {
     private static Set<Object> decodeSet(Type targetType,
             boolean restrictToInternalTypes, JsonArray jsonArray,
             ConnectorTracker connectorTracker) {
-        HashSet<Object> set = new HashSet<Object>();
+        HashSet<Object> set = new HashSet<>();
         set.addAll(decodeList(targetType, restrictToInternalTypes, jsonArray,
                 connectorTracker));
         return set;
@@ -702,7 +702,7 @@ public class JsonCodec implements Serializable {
         if (cachedProperties != null) {
             return cachedProperties;
         }
-        Collection<BeanProperty> properties = new ArrayList<BeanProperty>();
+        Collection<BeanProperty> properties = new ArrayList<>();
 
         properties.addAll(MethodProperty.find(type));
         properties.addAll(FieldProperty.find(type));
index 19f79b6507f6812c295889f3b23b993ec586e041..4463fd1ab5dce92ab0b9a1465576853ae0fef313 100644 (file)
@@ -65,7 +65,7 @@ public class JsonPaintTarget implements PaintTarget {
 
     private int changes = 0;
 
-    private final Set<Object> usedResources = new HashSet<Object>();
+    private final Set<Object> usedResources = new HashSet<>();
 
     private boolean customLayoutArgumentsOpen = false;
 
@@ -73,7 +73,7 @@ public class JsonPaintTarget implements PaintTarget {
 
     private boolean cacheEnabled = false;
 
-    private final Set<Class<? extends ClientConnector>> usedClientConnectors = new HashSet<Class<? extends ClientConnector>>();
+    private final Set<Class<? extends ClientConnector>> usedClientConnectors = new HashSet<>();
 
     /**
      * Creates a new JsonPaintTarget.
@@ -96,11 +96,11 @@ public class JsonPaintTarget implements PaintTarget {
         uidlBuffer = new PrintWriter(outWriter);
 
         // Initialize tag-writing
-        mOpenTags = new Stack<String>();
-        openJsonTags = new Stack<JsonTag>();
+        mOpenTags = new Stack<>();
+        openJsonTags = new Stack<>();
 
-        openPaintables = new Stack<ClientConnector>();
-        openPaintableTags = new Stack<String>();
+        openPaintables = new Stack<>();
+        openPaintableTags = new Stack<>();
 
         cacheEnabled = cachingRequired;
     }
@@ -728,11 +728,11 @@ public class JsonPaintTarget implements PaintTarget {
     class JsonTag implements Serializable {
         boolean firstField = false;
 
-        Vector<Object> variables = new Vector<Object>();
+        Vector<Object> variables = new Vector<>();
 
-        Vector<Object> children = new Vector<Object>();
+        Vector<Object> children = new Vector<>();
 
-        Vector<Object> attr = new Vector<Object>();
+        Vector<Object> attr = new Vector<>();
 
         StringBuilder data = new StringBuilder();
 
index 389fcd8b667347473aca459449c5e2e614388b52..54d85c4bcee16677a684d995c1f50dca700c3c31 100644 (file)
@@ -32,9 +32,9 @@ public class KeyMapper<V> implements DataKeyMapper<V>, Serializable {
 
     private int lastKey = 0;
 
-    private final HashMap<V, String> objectKeyMap = new HashMap<V, String>();
+    private final HashMap<V, String> objectKeyMap = new HashMap<>();
 
-    private final HashMap<String, V> keyObjectMap = new HashMap<String, V>();
+    private final HashMap<String, V> keyObjectMap = new HashMap<>();
 
     /**
      * Gets key for an object.
index 93f3da3d8fe0a183e426e5f03f3556a54b570750..210520cfaa508128c7cb8d8652849452c087bf70 100644 (file)
@@ -42,7 +42,7 @@ public abstract class LegacyApplication implements ErrorHandler {
     private LegacyWindow mainWindow;
     private String theme;
 
-    private Map<String, LegacyWindow> legacyUINames = new HashMap<String, LegacyWindow>();
+    private Map<String, LegacyWindow> legacyUINames = new HashMap<>();
 
     private boolean isRunning = true;
 
index 513f598b21f172faeede306f2c67054402bdd710..858f61d0c7b18c8193ae6d8675ae55a1804c3680 100644 (file)
@@ -56,7 +56,7 @@ import elemental.json.JsonValue;
 public class LegacyCommunicationManager implements Serializable {
 
     // TODO Refactor (#11410)
-    private final HashMap<Integer, ClientCache> uiToClientCache = new HashMap<Integer, ClientCache>();
+    private final HashMap<Integer, ClientCache> uiToClientCache = new HashMap<>();
 
     /**
      * The session this communication manager is used for
@@ -67,7 +67,7 @@ public class LegacyCommunicationManager implements Serializable {
     private String requestThemeName;
 
     // TODO Refactor (#11413)
-    private Map<String, Class<?>> publishedFileContexts = new HashMap<String, Class<?>>();
+    private Map<String, Class<?>> publishedFileContexts = new HashMap<>();
 
     /**
      * TODO New constructor - document me!
@@ -82,7 +82,7 @@ public class LegacyCommunicationManager implements Serializable {
         return session;
     }
 
-    private static final ConcurrentHashMap<Class<? extends SharedState>, JsonValue> referenceDiffStates = new ConcurrentHashMap<Class<? extends SharedState>, JsonValue>();
+    private static final ConcurrentHashMap<Class<? extends SharedState>, JsonValue> referenceDiffStates = new ConcurrentHashMap<>();
 
     /**
      * @deprecated As of 7.1. See #11411.
@@ -307,7 +307,7 @@ public class LegacyCommunicationManager implements Serializable {
         }
     }
 
-    private final HashMap<Class<? extends ClientConnector>, Integer> typeToKey = new HashMap<Class<? extends ClientConnector>, Integer>();
+    private final HashMap<Class<? extends ClientConnector>, Integer> typeToKey = new HashMap<>();
     private int nextTypeKey = 0;
 
     /**
@@ -338,7 +338,7 @@ public class LegacyCommunicationManager implements Serializable {
     @Deprecated
     public class ClientCache implements Serializable {
 
-        private final Set<Object> res = new HashSet<Object>();
+        private final Set<Object> res = new HashSet<>();
 
         /**
          *
index 7142659fca341798ac84fae011b68f5cedc35a02..9330c08a2873f272ebc8739cfbeef94e2ad2512d 100644 (file)
@@ -273,7 +273,7 @@ public class Page implements Serializable {
      * Resources to be opened automatically on next repaint. The list is
      * automatically cleared when it has been sent to the client.
      */
-    private final LinkedList<OpenResource> openList = new LinkedList<OpenResource>();
+    private final LinkedList<OpenResource> openList = new LinkedList<>();
 
     /**
      * A list of notifications that are waiting to be sent to the client.
@@ -388,9 +388,9 @@ public class Page implements Serializable {
      */
     public static class Styles implements Serializable {
 
-        private LinkedHashSet<InjectedStyle> injectedStyles = new LinkedHashSet<InjectedStyle>();
+        private LinkedHashSet<InjectedStyle> injectedStyles = new LinkedHashSet<>();
 
-        private LinkedHashSet<InjectedStyle> pendingInjections = new LinkedHashSet<InjectedStyle>();
+        private LinkedHashSet<InjectedStyle> pendingInjections = new LinkedHashSet<>();
 
         private final UI ui;
 
@@ -440,7 +440,7 @@ public class Page implements Serializable {
             if (target.isFullRepaint()) {
                 injectedStyles.addAll(pendingInjections);
                 pendingInjections = injectedStyles;
-                injectedStyles = new LinkedHashSet<InjectedStyle>();
+                injectedStyles = new LinkedHashSet<>();
             }
 
             if (!pendingInjections.isEmpty()) {
@@ -1161,7 +1161,7 @@ public class Page implements Serializable {
      */
     private void addNotification(Notification notification) {
         if (notifications == null) {
-            notifications = new LinkedList<Notification>();
+            notifications = new LinkedList<>();
         }
         notifications.add(notification);
         uI.markAsDirty();
index e1f5f798609801bd033d78f7a3e205375e55c42e..e9f8d9543e93eedab7ed8c1ec1b7cd7c04085696 100644 (file)
@@ -69,7 +69,7 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
 
     }
 
-    private static final Map<Class<?>, Class<?>> boxedTypes = new HashMap<Class<?>, Class<?>>();
+    private static final Map<Class<?>, Class<?>> boxedTypes = new HashMap<>();
     static {
         try {
             Class<?>[] boxClasses = new Class<?>[] { Boolean.class, Byte.class,
index 22bcd1bf6bf2ca0ebf008ee9328cada623198885..f4e2b4064d6640012358dd7550fe2fd5563d42f3 100644 (file)
@@ -24,7 +24,7 @@ import com.vaadin.shared.communication.ServerRpc;
 
 public class ServerRpcMethodInvocation extends MethodInvocation {
 
-    private static final Map<String, Method> invocationMethodCache = new ConcurrentHashMap<String, Method>(
+    private static final Map<String, Method> invocationMethodCache = new ConcurrentHashMap<>(
             128, 0.75f, 1);
 
     private final Method method;
index f431d08b7eb12d2076e0b79e0aea3abe3143cddd..6a6cb429d304e2bf910b0264202148a834c90f18 100644 (file)
@@ -64,13 +64,13 @@ import com.vaadin.util.CurrentInstance;
 @SuppressWarnings("serial")
 public class VaadinPortletSession extends VaadinSession {
 
-    private final Set<PortletListener> portletListeners = new LinkedHashSet<PortletListener>();
+    private final Set<PortletListener> portletListeners = new LinkedHashSet<>();
 
-    private final Map<String, QName> eventActionDestinationMap = new HashMap<String, QName>();
-    private final Map<String, Serializable> eventActionValueMap = new HashMap<String, Serializable>();
+    private final Map<String, QName> eventActionDestinationMap = new HashMap<>();
+    private final Map<String, Serializable> eventActionValueMap = new HashMap<>();
 
-    private final Map<String, String> sharedParameterActionNameMap = new HashMap<String, String>();
-    private final Map<String, String> sharedParameterActionValueMap = new HashMap<String, String>();
+    private final Map<String, String> sharedParameterActionNameMap = new HashMap<>();
+    private final Map<String, String> sharedParameterActionValueMap = new HashMap<>();
 
     /**
      * Create a portlet service session for the given portlet service
@@ -143,7 +143,7 @@ public class VaadinPortletSession extends VaadinSession {
      */
     public void firePortletRenderRequest(UI uI, RenderRequest request,
             RenderResponse response) {
-        for (PortletListener l : new ArrayList<PortletListener>(
+        for (PortletListener l : new ArrayList<>(
                 portletListeners)) {
             l.handleRenderRequest(request,
                     new RestrictedRenderResponse(response), uI);
@@ -172,7 +172,7 @@ public class VaadinPortletSession extends VaadinSession {
             sharedParameterActionValueMap.remove(key);
         } else {
             // normal action request, notify listeners
-            for (PortletListener l : new ArrayList<PortletListener>(
+            for (PortletListener l : new ArrayList<>(
                     portletListeners)) {
                 l.handleActionRequest(request, response, uI);
             }
@@ -184,7 +184,7 @@ public class VaadinPortletSession extends VaadinSession {
      */
     public void firePortletEventRequest(UI uI, EventRequest request,
             EventResponse response) {
-        for (PortletListener l : new ArrayList<PortletListener>(
+        for (PortletListener l : new ArrayList<>(
                 portletListeners)) {
             l.handleEventRequest(request, response, uI);
         }
@@ -195,7 +195,7 @@ public class VaadinPortletSession extends VaadinSession {
      */
     public void firePortletResourceRequest(UI uI, ResourceRequest request,
             ResourceResponse response) {
-        for (PortletListener l : new ArrayList<PortletListener>(
+        for (PortletListener l : new ArrayList<>(
                 portletListeners)) {
             l.handleResourceRequest(request, response, uI);
         }
index 50e20a038927ac92374051fc1a78fa0ef9b0f761..922c7cfe52e79350e78089416ed07ac80c4b0a79 100644 (file)
@@ -209,7 +209,7 @@ public abstract class VaadinService implements Serializable {
      */
     protected List<RequestHandler> createRequestHandlers()
             throws ServiceException {
-        ArrayList<RequestHandler> handlers = new ArrayList<RequestHandler>();
+        ArrayList<RequestHandler> handlers = new ArrayList<>();
         handlers.add(new SessionRequestHandler());
         handlers.add(new PublishedFileHandler());
         handlers.add(new HeartbeatHandler());
@@ -466,7 +466,7 @@ public abstract class VaadinService implements Serializable {
                 if (session.getState() == State.OPEN) {
                     closeSession(session);
                 }
-                ArrayList<UI> uis = new ArrayList<UI>(session.getUIs());
+                ArrayList<UI> uis = new ArrayList<>(session.getUIs());
                 for (final UI ui : uis) {
                     ui.accessSynchronously(new Runnable() {
                         @Override
@@ -1050,7 +1050,7 @@ public abstract class VaadinService implements Serializable {
         // Stores all attributes (security key, reference to this context
         // instance) so they can be added to the new session
         Set<String> attributeNames = oldSession.getAttributeNames();
-        HashMap<String, Object> attrs = new HashMap<String, Object>(
+        HashMap<String, Object> attrs = new HashMap<>(
                 attributeNames.size() * 2);
         for (String name : attributeNames) {
             Object value = oldSession.getAttribute(name);
@@ -1190,7 +1190,7 @@ public abstract class VaadinService implements Serializable {
      * @param session
      */
     private void removeClosedUIs(final VaadinSession session) {
-        ArrayList<UI> uis = new ArrayList<UI>(session.getUIs());
+        ArrayList<UI> uis = new ArrayList<>(session.getUIs());
         for (final UI ui : uis) {
             if (ui.isClosing()) {
                 ui.accessSynchronously(new Runnable() {
index e3402f6937e20c064f5b3e5b0a34469a5bd281b1..03d47b669369108ada75bee4391cdddce95e120b 100644 (file)
@@ -87,7 +87,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
             css = json.getString("css");
             timestamp = Long.parseLong(json.getString("timestamp"));
 
-            sourceUris = new ArrayList<String>();
+            sourceUris = new ArrayList<>();
 
             JsonArray uris = json.getArray("uris");
             for (int i = 0; i < uris.length(); i++) {
@@ -661,7 +661,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
         return sb.toString();
     }
 
-    private static final Collection<Character> CHAR_BLACKLIST = new HashSet<Character>(
+    private static final Collection<Character> CHAR_BLACKLIST = new HashSet<>(
             Arrays.asList(new Character[] { '&', '"', '\'', '<', '>', '(', ')',
                     ';' }));
 
@@ -678,7 +678,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
      * Global cache of scss compilation results. This map is protected from
      * concurrent access by {@link #SCSS_MUTEX}.
      */
-    private final Map<String, ScssCacheEntry> scssCache = new HashMap<String, ScssCacheEntry>();
+    private final Map<String, ScssCacheEntry> scssCache = new HashMap<>();
 
     /**
      * Keeps track of whether a warning about not being able to persist cache
index 8b503b9b373d6d1d85abab07386d3aef6b38f9bd..d2cf4e740a26706241c171799b9acd4918df373c 100644 (file)
@@ -226,12 +226,12 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
     @Deprecated
     private Object converterFactory;
 
-    private LinkedList<RequestHandler> requestHandlers = new LinkedList<RequestHandler>();
+    private LinkedList<RequestHandler> requestHandlers = new LinkedList<>();
 
     private int nextUIId = 0;
-    private Map<Integer, UI> uIs = new HashMap<Integer, UI>();
+    private Map<Integer, UI> uIs = new HashMap<>();
 
-    private final Map<String, Integer> embedIdMap = new HashMap<String, Integer>();
+    private final Map<String, Integer> embedIdMap = new HashMap<>();
 
     private final EventRouter eventRouter = new EventRouter();
 
@@ -253,9 +253,9 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
 
     private transient WrappedSession session;
 
-    private final Map<String, Object> attributes = new HashMap<String, Object>();
+    private final Map<String, Object> attributes = new HashMap<>();
 
-    private LinkedList<UIProvider> uiProviders = new LinkedList<UIProvider>();
+    private LinkedList<UIProvider> uiProviders = new LinkedList<>();
 
     private transient VaadinService service;
 
@@ -266,7 +266,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
      * session is serialized as long as it doesn't happen while some other
      * thread has the lock.
      */
-    private transient ConcurrentLinkedQueue<FutureAccess> pendingAccessQueue = new ConcurrentLinkedQueue<FutureAccess>();
+    private transient ConcurrentLinkedQueue<FutureAccess> pendingAccessQueue = new ConcurrentLinkedQueue<>();
 
     /**
      * Creates a new VaadinSession tied to a VaadinService.
@@ -465,7 +465,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
      */
     public static Collection<VaadinSession> getAllSessions(
             HttpSession httpSession) {
-        Set<VaadinSession> sessions = new HashSet<VaadinSession>();
+        Set<VaadinSession> sessions = new HashSet<>();
         Enumeration<String> attributeNames = httpSession.getAttributeNames();
 
         while (attributeNames.hasMoreElements()) {
@@ -1426,7 +1426,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
         Map<Class<?>, CurrentInstance> old = CurrentInstance.setCurrent(this);
         try {
             stream.defaultReadObject();
-            pendingAccessQueue = new ConcurrentLinkedQueue<FutureAccess>();
+            pendingAccessQueue = new ConcurrentLinkedQueue<>();
         } finally {
             CurrentInstance.restoreInstances(old);
         }
index 781cdedc5c66be0ecf5ea9d4b8501aa016a3a8f9..39944fc7dadfce6ae6722ad87c4d1bf2c36b4bf5 100644 (file)
@@ -76,7 +76,7 @@ public class WrappedHttpSession implements WrappedSession {
 
     // Helper shared with WrappedPortletSession
     static <T> Set<T> enumerationToSet(Enumeration<T> values) {
-        HashSet<T> set = new HashSet<T>();
+        HashSet<T> set = new HashSet<>();
         while (values.hasMoreElements()) {
             set.add(values.nextElement());
         }
index 94755385ebc86e646dfca884f88b2f6123124aca..efa8cc3be9fa85119ebce6ee20b21280414e8e82 100644 (file)
@@ -116,7 +116,7 @@ public class ClientRpcWriter implements Serializable {
      */
     private Collection<ClientMethodInvocation> collectPendingRpcCalls(
             Collection<ClientConnector> rpcPendingQueue) {
-        List<ClientMethodInvocation> pendingInvocations = new ArrayList<ClientMethodInvocation>();
+        List<ClientMethodInvocation> pendingInvocations = new ArrayList<>();
         for (ClientConnector connector : rpcPendingQueue) {
             List<ClientMethodInvocation> paintablePendingRpc = connector
                     .retrievePendingRpcCalls();
@@ -124,7 +124,7 @@ public class ClientRpcWriter implements Serializable {
                 List<ClientMethodInvocation> oldPendingRpc = pendingInvocations;
                 int totalCalls = pendingInvocations.size()
                         + paintablePendingRpc.size();
-                pendingInvocations = new ArrayList<ClientMethodInvocation>(
+                pendingInvocations = new ArrayList<>(
                         totalCalls);
 
                 // merge two ordered comparable lists
index 041c5e9e8b9413e5c1fb4d19b436ae09c6fa6ea4..498dcf5bf4eab3ab39fa9c7218b61293ff5455af 100644 (file)
@@ -60,7 +60,7 @@ public class LegacyUidlWriter implements Serializable {
         Collection<ClientConnector> dirtyVisibleConnectors = ui
                 .getConnectorTracker().getDirtyVisibleConnectors();
 
-        List<Component> legacyComponents = new ArrayList<Component>(
+        List<Component> legacyComponents = new ArrayList<>(
                 dirtyVisibleConnectors.size());
         for (ClientConnector connector : dirtyVisibleConnectors) {
             // All Components that want to use paintContent must implement
index c4160a92dd80a7efa093f8989b85ffd3effbc16a..8ec3503be0ad7918fd8bbf536475d9306c892d00 100644 (file)
@@ -334,7 +334,7 @@ public class ServerRpcHandler implements Serializable {
         try {
             ConnectorTracker connectorTracker = ui.getConnectorTracker();
 
-            Set<Connector> enabledConnectors = new HashSet<Connector>();
+            Set<Connector> enabledConnectors = new HashSet<>();
 
             List<MethodInvocation> invocations = parseInvocations(
                     ui.getConnectorTracker(), invocationsData,
@@ -491,7 +491,7 @@ public class ServerRpcHandler implements Serializable {
             ConnectorTracker connectorTracker, JsonArray invocationsJson,
             int lastSyncIdSeenByClient) {
         int invocationCount = invocationsJson.length();
-        ArrayList<MethodInvocation> invocations = new ArrayList<MethodInvocation>(
+        ArrayList<MethodInvocation> invocations = new ArrayList<>(
                 invocationCount);
 
         MethodInvocation previousInvocation = null;
index 0a890282cdf08c50a3ca579aa01418c749bccf9b..85b1fda1bf806520c41a890b85aa06b670d09d85 100644 (file)
@@ -54,7 +54,7 @@ public class SessionRequestHandler implements RequestHandler {
         session.lock();
         ArrayList<RequestHandler> requestHandlers;
         try {
-            requestHandlers = new ArrayList<RequestHandler>(
+            requestHandlers = new ArrayList<>(
                     session.getRequestHandlers());
         } finally {
             session.unlock();
index 1e0efb88ff64423eb1a1c242302b750b3e336992..73b82fc877e7f15724a29a895a2f6e919cbf0ea9 100644 (file)
@@ -58,7 +58,7 @@ public class SharedStateWriter implements Serializable {
         Collection<ClientConnector> dirtyVisibleConnectors = ui
                 .getConnectorTracker().getDirtyVisibleConnectors();
 
-        Set<String> writtenConnectors = new HashSet<String>();
+        Set<String> writtenConnectors = new HashSet<>();
         JsonObject sharedStates = Json.createObject();
         for (ClientConnector connector : dirtyVisibleConnectors) {
             // encode and send shared state
index 3028475d1b235d9cab4e1514dbf3257747072817..713243396322f6fc0937030e17ae98f9bed9f4bb 100644 (file)
@@ -80,7 +80,7 @@ public class UidlWriter implements Serializable {
         // to write out
         service.runPendingAccessTasks(session);
 
-        Set<ClientConnector> processedConnectors = new HashSet<ClientConnector>();
+        Set<ClientConnector> processedConnectors = new HashSet<>();
 
         LegacyCommunicationManager manager = session.getCommunicationManager();
         ClientCache clientCache = manager.getClientCache(ui);
@@ -90,7 +90,7 @@ public class UidlWriter implements Serializable {
         getLogger().log(Level.FINE, "* Creating response to client");
 
         while (true) {
-            ArrayList<ClientConnector> connectorsToProcess = new ArrayList<ClientConnector>();
+            ArrayList<ClientConnector> connectorsToProcess = new ArrayList<>();
             for (ClientConnector c : uiConnectorTracker.getDirtyConnectors()) {
                 if (!processedConnectors.contains(c)
                         && LegacyCommunicationManager
@@ -209,7 +209,7 @@ public class UidlWriter implements Serializable {
                     .getUsedClientConnectors();
             boolean typeMappingsOpen = false;
 
-            List<Class<? extends ClientConnector>> newConnectorTypes = new ArrayList<Class<? extends ClientConnector>>();
+            List<Class<? extends ClientConnector>> newConnectorTypes = new ArrayList<>();
 
             for (Class<? extends ClientConnector> class1 : usedClientConnectors) {
                 if (clientCache.cache(class1)) {
@@ -284,8 +284,8 @@ public class UidlWriter implements Serializable {
                 }
             });
 
-            List<String> scriptDependencies = new ArrayList<String>();
-            List<String> styleDependencies = new ArrayList<String>();
+            List<String> scriptDependencies = new ArrayList<>();
+            List<String> styleDependencies = new ArrayList<>();
 
             for (Class<? extends ClientConnector> class1 : newConnectorTypes) {
                 JavaScript jsAnnotation = class1
index 2bb44f65dd100fcb053f5d3305773faaf2f933a6..fe950b4318e5c5fde34222012e2d6b6aa54e3d7a 100644 (file)
@@ -100,7 +100,7 @@ public class SASSAddonImportFileCreator {
 
             // Sort addon styles so that CSS imports are first and SCSS import
             // last
-            List<String> paths = new ArrayList<String>(addonThemes.keySet());
+            List<String> paths = new ArrayList<>(addonThemes.keySet());
             Collections.sort(paths, new Comparator<String>() {
 
                 @Override
@@ -117,7 +117,7 @@ public class SASSAddonImportFileCreator {
                 }
             });
 
-            List<String> mixins = new ArrayList<String>();
+            List<String> mixins = new ArrayList<>();
             for (String path : paths) {
                 mixins.addAll(
                         addImport(printStream, path, addonThemes.get(path)));
@@ -142,7 +142,7 @@ public class SASSAddonImportFileCreator {
         // Add import comment
         printImportComment(stream, location);
 
-        List<String> foundMixins = new ArrayList<String>();
+        List<String> foundMixins = new ArrayList<>();
 
         if (file.endsWith(".css")) {
             stream.print("@import url(\"../../../" + file + "\");\n");
index da5b692533d0fc941286aa88d32091771f4eb3a9..5d1bbbfa5f09f9266d736dac738a357794726700 100644 (file)
@@ -145,8 +145,8 @@ public class ClassPathExplorer {
      */
     public static LocationInfo getAvailableWidgetSetsAndStylesheets() {
         long start = System.currentTimeMillis();
-        Map<String, URL> widgetsets = new HashMap<String, URL>();
-        Map<String, URL> themes = new HashMap<String, URL>();
+        Map<String, URL> widgetsets = new HashMap<>();
+        Map<String, URL> themes = new HashMap<>();
         Set<String> keySet = classpathLocations.keySet();
         for (String location : keySet) {
             searchForWidgetSetsAndAddonStyles(location, widgetsets, themes);
@@ -298,7 +298,7 @@ public class ClassPathExplorer {
      */
     private final static List<String> getRawClasspathEntries() {
         // try to keep the order of the classpath
-        List<String> locations = new ArrayList<String>();
+        List<String> locations = new ArrayList<>();
 
         String pathSep = System.getProperty("path.separator");
         String classpath = System.getProperty("java.class.path");
@@ -338,7 +338,7 @@ public class ClassPathExplorer {
             List<String> rawClasspathEntries) {
         long start = System.currentTimeMillis();
         // try to keep the order of the classpath
-        Map<String, URL> locations = new LinkedHashMap<String, URL>();
+        Map<String, URL> locations = new LinkedHashMap<>();
         for (String classpathEntry : rawClasspathEntries) {
             File file = new File(classpathEntry);
             include(null, file, locations);
@@ -520,7 +520,7 @@ public class ClassPathExplorer {
     public static URL getWidgetsetSourceDirectory(String widgetsetFileName) {
         if (debug) {
             debug("classpathLocations values:");
-            ArrayList<String> locations = new ArrayList<String>(
+            ArrayList<String> locations = new ArrayList<>(
                     classpathLocations.keySet());
             for (String location : locations) {
                 debug(String.valueOf(classpathLocations.get(location)));
index 645c15fc1a7063f59a9666c7dc8f01035bd0a44d..f64b43092f894fb7929b186aa6c8c81c49cf4014 100644 (file)
@@ -168,7 +168,7 @@ public class WidgetSetBuilder {
 
     private static Collection<String> getCurrentInheritedWidgetsets(
             String content) {
-        HashSet<String> hashSet = new HashSet<String>();
+        HashSet<String> hashSet = new HashSet<>();
         Pattern inheritsPattern = Pattern.compile(" name=\"([^\"]*)\"");
 
         Matcher matcher = inheritsPattern.matcher(content);
index 59221fcd8398d500e9865e081162a67ff6fa6105..d435bc806b03000731fee1765a7300684cb193d1 100644 (file)
@@ -63,7 +63,7 @@ public class AbsoluteLayout extends AbstractLayout
         }
     };
     // Maps each component to a position
-    private LinkedHashMap<Component, ComponentPosition> componentToCoordinates = new LinkedHashMap<Component, ComponentPosition>();
+    private LinkedHashMap<Component, ComponentPosition> componentToCoordinates = new LinkedHashMap<>();
 
     /**
      * Creates an AbsoluteLayout with full size.
@@ -191,7 +191,7 @@ public class AbsoluteLayout extends AbstractLayout
         // Map<Connector,String> was supported. We cannot get the child
         // connectorId unless the component is attached to the application so
         // the String->String map cannot be populated in internal* either.
-        Map<String, String> connectorToPosition = new HashMap<String, String>();
+        Map<String, String> connectorToPosition = new HashMap<>();
         for (Iterator<Component> ci = getComponentIterator(); ci.hasNext();) {
             Component c = ci.next();
             connectorToPosition.put(c.getConnectorId(),
index 536e831d87a638d595b29dbc5ea7425e4665383a..a34b09e9d81e6ac8ea0f35fb14438dfd47a1e438 100644 (file)
@@ -197,7 +197,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
             return;
         }
         if (getState().styles == null) {
-            getState().styles = new ArrayList<String>();
+            getState().styles = new ArrayList<>();
         }
         List<String> styles = getState().styles;
         styles.clear();
@@ -232,7 +232,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
         }
 
         if (getState().styles == null) {
-            getState().styles = new ArrayList<String>();
+            getState().styles = new ArrayList<>();
         }
         List<String> styles = getState().styles;
         if (!styles.contains(style)) {
@@ -1027,7 +1027,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
         }
 
         // check for unsupported attributes
-        Set<String> supported = new HashSet<String>();
+        Set<String> supported = new HashSet<>();
         supported.addAll(getDefaultAttributes());
         supported.addAll(getCustomAttributes());
         for (Attribute a : attr) {
@@ -1084,7 +1084,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
             }
         } else {
             // remove responsive extensions
-            List<Extension> extensions = new ArrayList<Extension>(
+            List<Extension> extensions = new ArrayList<>(
                     getExtensions());
             for (Extension e : extensions) {
                 if (e instanceof Responsive) {
@@ -1263,7 +1263,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
      *         implementation
      */
     protected Collection<String> getCustomAttributes() {
-        ArrayList<String> l = new ArrayList<String>(
+        ArrayList<String> l = new ArrayList<>(
                 Arrays.asList(customAttributes));
         if (this instanceof Focusable) {
             l.add("tab-index");
index 4dacf2c64a8aaa2813136fa11dc1ccf9d50b92b5..b5fe4e9bcd8d7e8caf8d0fa20f248b86e0a66c55 100644 (file)
@@ -62,7 +62,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
      */
     @Override
     public void removeAllComponents() {
-        final LinkedList<Component> l = new LinkedList<Component>();
+        final LinkedList<Component> l = new LinkedList<>();
 
         // Adds all components
         for (final Iterator<Component> i = getComponentIterator(); i
@@ -83,7 +83,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
      */
     @Override
     public void moveComponentsFrom(ComponentContainer source) {
-        final LinkedList<Component> components = new LinkedList<Component>();
+        final LinkedList<Component> components = new LinkedList<>();
         for (final Iterator<Component> i = source.getComponentIterator(); i
                 .hasNext();) {
             components.add(i.next());
@@ -301,7 +301,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
                     : ComponentSizeValidator.checkWidths(component);
             if (!valid) {
                 if (components == null) {
-                    components = new HashSet<Component>();
+                    components = new HashSet<>();
                 }
                 components.add(component);
             }
index f24c3e5e08800e10937e32ecc76a0e9951395ccf..f56f6a7f27cfad8726b820a93bdb251decc91579 100644 (file)
@@ -152,7 +152,7 @@ public abstract class AbstractMedia extends AbstractComponent {
      * @return The sources pointed to in this media.
      */
     public List<Resource> getSources() {
-        ArrayList<Resource> sources = new ArrayList<Resource>();
+        ArrayList<Resource> sources = new ArrayList<>();
         for (URLReference ref : getState(false).sources) {
             sources.add(((ResourceReference) ref).getResource());
         }
index 453adb2579f15a72d047cb150f6662c14ef3af7e..331a0e72be8dd8ee4b6ad63a81361218efb01753 100644 (file)
@@ -58,7 +58,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout
     /**
      * Custom layout slots containing the components.
      */
-    protected LinkedList<Component> components = new LinkedList<Component>();
+    protected LinkedList<Component> components = new LinkedList<>();
 
     private Alignment defaultComponentAlignment = Alignment.TOP_LEFT;
 
index d92d554cf5aeb0347d73575fa64846220e1dea0f..fd2c0029d15593f8f6d9921824987e87cf38e719 100644 (file)
@@ -67,21 +67,21 @@ import elemental.json.JsonObject;
  */
 public class ConnectorTracker implements Serializable {
 
-    private final HashMap<String, ClientConnector> connectorIdToConnector = new HashMap<String, ClientConnector>();
-    private Set<ClientConnector> dirtyConnectors = new HashSet<ClientConnector>();
-    private Set<ClientConnector> uninitializedConnectors = new HashSet<ClientConnector>();
+    private final HashMap<String, ClientConnector> connectorIdToConnector = new HashMap<>();
+    private Set<ClientConnector> dirtyConnectors = new HashSet<>();
+    private Set<ClientConnector> uninitializedConnectors = new HashSet<>();
 
     /**
      * Connectors that have been unregistered and should be cleaned up the next
      * time {@link #cleanConnectorMap()} is invoked unless they have been
      * registered again.
      */
-    private final Set<ClientConnector> unregisteredConnectors = new HashSet<ClientConnector>();
+    private final Set<ClientConnector> unregisteredConnectors = new HashSet<>();
 
     private boolean writingResponse = false;
 
     private UI uI;
-    private transient Map<ClientConnector, JsonObject> diffStates = new HashMap<ClientConnector, JsonObject>();
+    private transient Map<ClientConnector, JsonObject> diffStates = new HashMap<>();
 
     /** Maps connectorIds to a map of named StreamVariables */
     private Map<String, Map<String, StreamVariable>> pidToNameToStreamVariable;
@@ -96,7 +96,7 @@ public class ConnectorTracker implements Serializable {
      * @see #getCurrentSyncId()
      * @see #cleanConcurrentlyRemovedConnectorIds(long)
      */
-    private TreeMap<Integer, Set<String>> syncIdToUnregisteredConnectorIds = new TreeMap<Integer, Set<String>>();
+    private TreeMap<Integer, Set<String>> syncIdToUnregisteredConnectorIds = new TreeMap<>();
 
     /**
      * Gets a logger for this class
@@ -185,7 +185,7 @@ public class ConnectorTracker implements Serializable {
         Set<String> unregisteredConnectorIds = syncIdToUnregisteredConnectorIds
                 .get(currentSyncId);
         if (unregisteredConnectorIds == null) {
-            unregisteredConnectorIds = new HashSet<String>();
+            unregisteredConnectorIds = new HashSet<>();
             syncIdToUnregisteredConnectorIds.put(currentSyncId,
                     unregisteredConnectorIds);
         }
@@ -438,10 +438,10 @@ public class ConnectorTracker implements Serializable {
     private boolean isHierarchyComplete() {
         boolean noErrors = true;
 
-        Set<ClientConnector> danglingConnectors = new HashSet<ClientConnector>(
+        Set<ClientConnector> danglingConnectors = new HashSet<>(
                 connectorIdToConnector.values());
 
-        LinkedList<ClientConnector> stack = new LinkedList<ClientConnector>();
+        LinkedList<ClientConnector> stack = new LinkedList<>();
         stack.add(uI);
         while (!stack.isEmpty()) {
             ClientConnector connector = stack.pop();
@@ -623,7 +623,7 @@ public class ConnectorTracker implements Serializable {
      */
     public ArrayList<ClientConnector> getDirtyVisibleConnectors() {
         Collection<ClientConnector> dirtyConnectors = getDirtyConnectors();
-        ArrayList<ClientConnector> dirtyVisibleConnectors = new ArrayList<ClientConnector>(
+        ArrayList<ClientConnector> dirtyVisibleConnectors = new ArrayList<>(
                 dirtyConnectors.size());
         for (ClientConnector c : dirtyConnectors) {
             if (LegacyCommunicationManager.isConnectorVisibleToClient(c)) {
@@ -706,7 +706,7 @@ public class ConnectorTracker implements Serializable {
         out.defaultWriteObject();
         // Convert JsonObjects in diff state to String representation as
         // JsonObject is not serializable
-        HashMap<ClientConnector, String> stringDiffStates = new HashMap<ClientConnector, String>(
+        HashMap<ClientConnector, String> stringDiffStates = new HashMap<>(
                 diffStates.size() * 2);
         for (ClientConnector key : diffStates.keySet()) {
             stringDiffStates.put(key, diffStates.get(key).toString());
@@ -721,11 +721,11 @@ public class ConnectorTracker implements Serializable {
 
         // Read String versions of JsonObjects and parse into JsonObjects as
         // JsonObject is not serializable
-        diffStates = new HashMap<ClientConnector, JsonObject>();
+        diffStates = new HashMap<>();
         @SuppressWarnings("unchecked")
         HashMap<ClientConnector, String> stringDiffStates = (HashMap<ClientConnector, String>) in
                 .readObject();
-        diffStates = new HashMap<ClientConnector, JsonObject>(
+        diffStates = new HashMap<>(
                 stringDiffStates.size() * 2);
         for (ClientConnector key : stringDiffStates.keySet()) {
             try {
@@ -770,18 +770,18 @@ public class ConnectorTracker implements Serializable {
             StreamVariable variable) {
         assert getConnector(connectorId) != null;
         if (pidToNameToStreamVariable == null) {
-            pidToNameToStreamVariable = new HashMap<String, Map<String, StreamVariable>>();
+            pidToNameToStreamVariable = new HashMap<>();
         }
         Map<String, StreamVariable> nameToStreamVariable = pidToNameToStreamVariable
                 .get(connectorId);
         if (nameToStreamVariable == null) {
-            nameToStreamVariable = new HashMap<String, StreamVariable>();
+            nameToStreamVariable = new HashMap<>();
             pidToNameToStreamVariable.put(connectorId, nameToStreamVariable);
         }
         nameToStreamVariable.put(variableName, variable);
 
         if (streamVariableToSeckey == null) {
-            streamVariableToSeckey = new HashMap<StreamVariable, String>();
+            streamVariableToSeckey = new HashMap<>();
         }
         String seckey = streamVariableToSeckey.get(variable);
         if (seckey == null) {
index 982c55cab2c3b2dc93db9b5f245753eecaa2a9fa..381e7aa4633a89e4bc3234c7c9207baa292f44dc 100644 (file)
@@ -85,7 +85,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
     /**
      * Custom layout slots containing the components.
      */
-    protected LinkedList<Component> components = new LinkedList<Component>();
+    protected LinkedList<Component> components = new LinkedList<>();
 
     /**
      * Constructs an empty CssLayout.
index 11ab9c2f0e0d35e1a6641c0c94b4d78567295ba5..179969765df9be2fc7fe034ccc05dc0992825e82 100644 (file)
@@ -67,7 +67,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
     /**
      * Custom layout slots containing the components.
      */
-    private final HashMap<String, Component> slots = new HashMap<String, Component>();
+    private final HashMap<String, Component> slots = new HashMap<>();
 
     /**
      * Default constructor only used by subclasses. Subclasses are responsible
index 280f80ee2187c1d78052dc9cc1fcef0c433f9c12..deffa066319dcb96d3a4912b3a7e201c8f2cf8da 100644 (file)
@@ -120,7 +120,7 @@ public class DragAndDropWrapper extends CustomComponent
         }
     };
 
-    private Map<String, ProxyReceiver> receivers = new HashMap<String, ProxyReceiver>();
+    private Map<String, ProxyReceiver> receivers = new HashMap<>();
 
     public class WrapperTargetDetails extends TargetDetailsImpl {
 
@@ -191,11 +191,11 @@ public class DragAndDropWrapper extends CustomComponent
         COMPONENT_OTHER,
     }
 
-    private final Map<String, Object> html5DataFlavors = new LinkedHashMap<String, Object>();
+    private final Map<String, Object> html5DataFlavors = new LinkedHashMap<>();
     private DragStartMode dragStartMode = DragStartMode.NONE;
     private Component dragImageComponent = null;
 
-    private Set<String> sentIds = new HashSet<String>();
+    private Set<String> sentIds = new HashSet<>();
 
     /**
      * This is an internal constructor. Use
index 382b0d47c394caf90493716e066058e43575bd6d..b0c7f1725b2703ea67c2399cb8e13621839d8c15 100644 (file)
@@ -88,7 +88,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
     /**
      * Hash of object parameters.
      */
-    private final Map<String, String> parameters = new HashMap<String, String>();
+    private final Map<String, String> parameters = new HashMap<>();
 
     /**
      * Applet or other client side runnable properties.
index c6eac450efb807b93df975cb8d3ced2ef952375d..faec5a83d961856250d397909ffa0eb1b8ae043a 100644 (file)
@@ -201,7 +201,7 @@ public class Flash extends AbstractEmbedded {
      */
     public void setParameter(String name, String value) {
         if (getState().embedParams == null) {
-            getState().embedParams = new HashMap<String, String>();
+            getState().embedParams = new HashMap<>();
         }
         getState().embedParams.put(name, value);
         requestRepaint();
@@ -238,7 +238,7 @@ public class Flash extends AbstractEmbedded {
         super.writeDesign(design, designContext);
 
         // Parameters, in alphabetic order
-        ArrayList<String> paramNames = new ArrayList<String>();
+        ArrayList<String> paramNames = new ArrayList<>();
         for (String param : getParameterNames()) {
             paramNames.add(param);
         }
index 546a89cdfc67177e53a9476867b9f38858077fa2..6e74071f657d2c1f37379534680bad41c5e11c33 100644 (file)
@@ -97,10 +97,10 @@ public class GridLayout extends AbstractLayout
      */
     private int cursorY = 0;
 
-    private final LinkedList<Component> components = new LinkedList<Component>();
+    private final LinkedList<Component> components = new LinkedList<>();
 
-    private Map<Integer, Float> columnExpandRatio = new HashMap<Integer, Float>();
-    private Map<Integer, Float> rowExpandRatio = new HashMap<Integer, Float>();
+    private Map<Integer, Float> columnExpandRatio = new HashMap<>();
+    private Map<Integer, Float> rowExpandRatio = new HashMap<>();
     private Alignment defaultComponentAlignment = Alignment.TOP_LEFT;
 
     /**
@@ -1290,8 +1290,8 @@ public class GridLayout extends AbstractLayout
 
         setMargin(readMargin(design, getMargin(), designContext));
 
-        List<Element> rowElements = new ArrayList<Element>();
-        List<Map<Integer, Component>> rows = new ArrayList<Map<Integer, Component>>();
+        List<Element> rowElements = new ArrayList<>();
+        List<Map<Integer, Component>> rows = new ArrayList<>();
         // Prepare a 2D map for reading column contents
         for (Element e : design.children()) {
             if (e.tagName().equalsIgnoreCase("row")) {
@@ -1301,8 +1301,8 @@ public class GridLayout extends AbstractLayout
             }
         }
         setRows(Math.max(rows.size(), 1));
-        Map<Component, Alignment> alignments = new HashMap<Component, Alignment>();
-        List<Integer> columnExpandRatios = new ArrayList<Integer>();
+        Map<Component, Alignment> alignments = new HashMap<>();
+        List<Integer> columnExpandRatios = new ArrayList<>();
         for (int row = 0; row < rowElements.size(); ++row) {
             Element rowElement = rowElements.get(row);
 
@@ -1386,7 +1386,7 @@ public class GridLayout extends AbstractLayout
         }
 
         // Reiterate through the 2D map and add components to GridLayout
-        Set<Component> visited = new HashSet<Component>();
+        Set<Component> visited = new HashSet<>();
 
         // Ignore any missing components
         visited.add(null);
@@ -1457,7 +1457,7 @@ public class GridLayout extends AbstractLayout
         }
 
         // Go through the map and write only needed column tags
-        Set<Connector> visited = new HashSet<Connector>();
+        Set<Connector> visited = new HashSet<>();
 
         // Skip the dummy placeholder
         visited.add(dummyComponent);
index b51577c4ac9668f77561f9ab71ed06d2c53fe740..92320c6df1598144cc73d2d9c28a6ef2691875b1 100644 (file)
@@ -38,7 +38,7 @@ import elemental.json.JsonException;
  * @since 7.0.0
  */
 public class JavaScript extends AbstractExtension {
-    private Map<String, JavaScriptFunction> functions = new HashMap<String, JavaScriptFunction>();
+    private Map<String, JavaScriptFunction> functions = new HashMap<>();
 
     // Can not be defined in client package as this JSONArray is not available
     // in GWT
index 9e986d34fbe25ed25476448f7ad78faa31bbf2bf..fe31eb3d7504c57d9abdce45e319fa2609e02921 100644 (file)
@@ -353,7 +353,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
      * URL in the method or the password manager will not be triggered.
      */
     private void login() {
-        HashMap<String, String> params = new HashMap<String, String>();
+        HashMap<String, String> params = new HashMap<>();
         params.put("username", getUsernameField().getValue());
         params.put("password", getPasswordField().getValue());
         LoginEvent event = new LoginEvent(LoginForm.this, params);
index db252b0619c94765bba7d271262ff69a0bcfb4d1..24f2dd89b36894462a4468189af140d6f3b70e87 100644 (file)
@@ -162,7 +162,7 @@ public class MenuBar extends AbstractComponent
     /** Deserialize changes received from client. */
     @Override
     public void changeVariables(Object source, Map<String, Object> variables) {
-        Stack<MenuItem> items = new Stack<MenuItem>();
+        Stack<MenuItem> items = new Stack<>();
         boolean found = false;
 
         if (variables.containsKey("clickedId")) {
@@ -205,7 +205,7 @@ public class MenuBar extends AbstractComponent
      * Constructs an empty, horizontal menu
      */
     public MenuBar() {
-        menuItems = new ArrayList<MenuItem>();
+        menuItems = new ArrayList<>();
         setMoreMenuItem(null);
     }
 
@@ -554,7 +554,7 @@ public class MenuBar extends AbstractComponent
             }
 
             if (itsChildren == null) {
-                itsChildren = new ArrayList<MenuItem>();
+                itsChildren = new ArrayList<>();
             }
 
             MenuItem newItem = new MenuItem(caption, icon, command);
@@ -1005,7 +1005,7 @@ public class MenuBar extends AbstractComponent
         }
 
         String caption = "";
-        List<Element> subMenus = new ArrayList<Element>();
+        List<Element> subMenus = new ArrayList<>();
         for (Node node : menuElement.childNodes()) {
             if (node instanceof Element
                     && ((Element) node).tagName().equals("menu")) {
@@ -1051,7 +1051,7 @@ public class MenuBar extends AbstractComponent
         }
 
         if (!subMenus.isEmpty()) {
-            menu.itsChildren = new ArrayList<MenuItem>();
+            menu.itsChildren = new ArrayList<>();
         }
 
         for (Element subMenu : subMenus) {
index ff9e1813f68702076257cb8b8cacaea6c14481b5..a03b342ba0d66079e1308dc8e8c00e13dfc67bec 100644 (file)
@@ -106,12 +106,12 @@ public class TabSheet extends AbstractComponentContainer
      * there is a {@link Tab} object in tabs for each tab with meta-data about
      * the tab.
      */
-    private final ArrayList<Component> components = new ArrayList<Component>();
+    private final ArrayList<Component> components = new ArrayList<>();
 
     /**
      * Map containing information related to the tabs (caption, icon etc).
      */
-    private final HashMap<Component, Tab> tabs = new HashMap<Component, Tab>();
+    private final HashMap<Component, Tab> tabs = new HashMap<>();
 
     /**
      * Selected tab content component.
@@ -122,7 +122,7 @@ public class TabSheet extends AbstractComponentContainer
      * Mapper between server-side component instances (tab contents) and keys
      * given to the client that identify tabs.
      */
-    private final KeyMapper<Component> keyMapper = new KeyMapper<Component>();
+    private final KeyMapper<Component> keyMapper = new KeyMapper<>();
 
     /**
      * Handler to be called when a tab is closed.
index 4454f965964e4358041a7e98c7b0dec645772940..82bbea7039f6846b7a5a026f0110ade94d59188e 100644 (file)
@@ -116,7 +116,7 @@ public abstract class UI extends AbstractSingleComponentContainer
     /**
      * List of windows in this UI.
      */
-    private final LinkedHashSet<Window> windows = new LinkedHashSet<Window>();
+    private final LinkedHashSet<Window> windows = new LinkedHashSet<>();
 
     /**
      * The component that should be scrolled into view after the next repaint.
@@ -415,7 +415,7 @@ public abstract class UI extends AbstractSingleComponentContainer
     public Iterator<Component> iterator() {
         // TODO could directly create some kind of combined iterator instead of
         // creating a new ArrayList
-        ArrayList<Component> components = new ArrayList<Component>();
+        ArrayList<Component> components = new ArrayList<>();
 
         if (getContent() != null) {
             components.add(getContent());
index 915e2035fa76ee2e31ed32fd2f5788a511f838fc..9077a35b9520f82da970cdfbbb2ae6d4d9929efa 100644 (file)
@@ -783,7 +783,7 @@ public class Upload extends AbstractComponent
      */
     public void addProgressListener(ProgressListener listener) {
         if (progressListeners == null) {
-            progressListeners = new LinkedHashSet<ProgressListener>();
+            progressListeners = new LinkedHashSet<>();
         }
         progressListeners.add(listener);
     }
index 6ad8ef500bbc47acea602eeeedc4da0d37629dae..c0eac75970b7a5d6b069155ec2a857c514f9e7b4 100644 (file)
@@ -106,7 +106,7 @@ public class Window extends Panel
     /**
      * Holds registered CloseShortcut instances for query and later removal
      */
-    private List<CloseShortcut> closeShortcuts = new ArrayList<CloseShortcut>(
+    private List<CloseShortcut> closeShortcuts = new ArrayList<>(
             4);
 
     /**
@@ -1398,7 +1398,7 @@ public class Window extends Panel
     @Override
     protected void readDesignChildren(Elements children,
             DesignContext context) {
-        List<Component> descriptions = new ArrayList<Component>();
+        List<Component> descriptions = new ArrayList<>();
         Elements content = new Elements();
 
         for (Element child : children) {
index ba5c279ed1c910958f8900feaf77578de3eafc19..a70ab256e1147e98fd14924847ebb8e21394db51 100644 (file)
@@ -55,7 +55,7 @@ public class DesignAttributeHandler implements Serializable {
         return Logger.getLogger(DesignAttributeHandler.class.getName());
     }
 
-    private static Map<Class<?>, AttributeCacheEntry> cache = new ConcurrentHashMap<Class<?>, AttributeCacheEntry>();
+    private static Map<Class<?>, AttributeCacheEntry> cache = new ConcurrentHashMap<>();
 
     // translates string <-> object
     private static DesignFormatter FORMATTER = new DesignFormatter();
@@ -81,7 +81,7 @@ public class DesignAttributeHandler implements Serializable {
         for (Attribute a : attr.asList()) {
             attr.remove(a.getKey());
         }
-        List<Node> children = new ArrayList<Node>();
+        List<Node> children = new ArrayList<>();
         children.addAll(design.childNodes());
         for (Node node : children) {
             node.remove();
@@ -428,7 +428,7 @@ public class DesignAttributeHandler implements Serializable {
      * @author Vaadin Ltd
      */
     private static class AttributeCacheEntry implements Serializable {
-        private Map<String, Method[]> accessMethods = new ConcurrentHashMap<String, Method[]>();
+        private Map<String, Method[]> accessMethods = new ConcurrentHashMap<>();
 
         private void addAttribute(String attribute, Method getter,
                 Method setter) {
@@ -439,7 +439,7 @@ public class DesignAttributeHandler implements Serializable {
         }
 
         private Collection<String> getAttributes() {
-            ArrayList<String> attributes = new ArrayList<String>();
+            ArrayList<String> attributes = new ArrayList<>();
             attributes.addAll(accessMethods.keySet());
             return attributes;
         }
index 505437d7780230eb35849279be98877aa524f3dd..35145c45fbb90a3d11523eafdde3b4676a91f152 100644 (file)
@@ -64,7 +64,7 @@ public class DesignContext implements Serializable {
     private static final String VAADIN7_UI_PACKAGE = "com.vaadin.v7.ui";
 
     // cache for object instances
-    private static Map<Class<?>, Component> instanceCache = new ConcurrentHashMap<Class<?>, Component>();
+    private static Map<Class<?>, Component> instanceCache = new ConcurrentHashMap<>();
 
     // The root component of the component hierarchy
     private Component rootComponent = null;
@@ -74,20 +74,20 @@ public class DesignContext implements Serializable {
     public static final String CAPTION_ATTRIBUTE = "caption";
     public static final String LOCAL_ID_ATTRIBUTE = "_id";
     // Mappings from ids to components. Modified when reading from design.
-    private Map<String, Component> idToComponent = new HashMap<String, Component>();
-    private Map<String, Component> localIdToComponent = new HashMap<String, Component>();
-    private Map<String, Component> captionToComponent = new HashMap<String, Component>();
+    private Map<String, Component> idToComponent = new HashMap<>();
+    private Map<String, Component> localIdToComponent = new HashMap<>();
+    private Map<String, Component> captionToComponent = new HashMap<>();
     // Mapping from components to local ids. Accessed when writing to
     // design. Modified when reading from design.
-    private Map<Component, String> componentToLocalId = new HashMap<Component, String>();
+    private Map<Component, String> componentToLocalId = new HashMap<>();
     private Document doc; // required for calling createElement(String)
     // namespace mappings
-    private Map<String, String> packageToPrefix = new HashMap<String, String>();
-    private Map<String, String> prefixToPackage = new HashMap<String, String>();
-    private final Map<Component, Map<String, String>> customAttributes = new HashMap<Component, Map<String, String>>();
+    private Map<String, String> packageToPrefix = new HashMap<>();
+    private Map<String, String> prefixToPackage = new HashMap<>();
+    private final Map<Component, Map<String, String>> customAttributes = new HashMap<>();
 
     // component creation listeners
-    private List<ComponentCreationListener> listeners = new ArrayList<ComponentCreationListener>();
+    private List<ComponentCreationListener> listeners = new ArrayList<>();
 
     private ShouldWriteDataDelegate shouldWriteDataDelegate = ShouldWriteDataDelegate.DEFAULT;
 
@@ -828,7 +828,7 @@ public class DesignContext implements Serializable {
         Map<String, String> map = customAttributes.get(component);
         if (map == null) {
             customAttributes.put(component,
-                    map = new HashMap<String, String>());
+                    map = new HashMap<>());
         }
         map.put(attribute, value);
     }
index 0fcefe0a27a0db620dec7640ec29329877daaa7d..203954dd27cd12fb9d27470f9a96622b2c5764b2 100644 (file)
@@ -55,7 +55,7 @@ import com.vaadin.ui.declarative.converters.DesignToStringConverter;
  */
 public class DesignFormatter implements Serializable {
 
-    private final Map<Class<?>, Converter<String, ?>> converterMap = new ConcurrentHashMap<Class<?>, Converter<String, ?>>();
+    private final Map<Class<?>, Converter<String, ?>> converterMap = new ConcurrentHashMap<>();
     private final Converter<String, Object> stringObjectConverter = new DesignObjectConverter();
 
     /**
index 25469b8cde70bca8a1b99f46ffc247b60979c53e..3d7dcc20d97e7e94c9523f30b8dbcc9be03153b7 100644 (file)
@@ -40,7 +40,7 @@ public class FieldBinder implements Serializable {
     // the instance containing the bound fields
     private Object bindTarget;
     // mapping between field names and Fields
-    private Map<String, Field> fieldMap = new HashMap<String, Field>();
+    private Map<String, Field> fieldMap = new HashMap<>();
 
     /**
      * Creates a new instance of LayoutFieldBinder.
@@ -79,7 +79,7 @@ public class FieldBinder implements Serializable {
      * @return a collection of fields assignable to Component that are not bound
      */
     public Collection<String> getUnboundFields() throws FieldBindingException {
-        List<String> unboundFields = new ArrayList<String>();
+        List<String> unboundFields = new ArrayList<>();
         for (Field f : fieldMap.values()) {
             try {
                 Object value = getFieldValue(bindTarget, f);
@@ -252,7 +252,7 @@ public class FieldBinder implements Serializable {
      */
     protected static List<java.lang.reflect.Field> getFields(
             Class<?> searchClass) {
-        ArrayList<java.lang.reflect.Field> memberFields = new ArrayList<java.lang.reflect.Field>();
+        ArrayList<java.lang.reflect.Field> memberFields = new ArrayList<>();
 
         for (java.lang.reflect.Field memberField : searchClass
                 .getDeclaredFields()) {
index cc9d6ac65598e4c1f244fe98ed0ddbf46d70f2c2..1efc382fccb8811659cb79f5bd0c0d009ba5ebe2 100644 (file)
@@ -169,7 +169,7 @@ public class DesignResourceConverter implements Converter<String, Resource> {
             return ((ExternalResource) value).getURL();
         }
 
-        private static Map<Class<? extends Resource>, ResourceConverterByProtocol> typeToConverter = new HashMap<Class<? extends Resource>, ResourceConverterByProtocol>();
+        private static Map<Class<? extends Resource>, ResourceConverterByProtocol> typeToConverter = new HashMap<>();
         static {
             typeToConverter.put(ExternalResource.class, HTTP);
             // ^ any of non-specialized would actually work
index fdd61f0489331ec03a4220ee041cc69bc9e72c32..2468c29c8cc1b15dea8fa27e1a2f547bcc253550 100644 (file)
@@ -40,7 +40,7 @@ public class DesignShortcutActionConverter
     private final Map<String, Integer> presentationMap;
 
     public DesignShortcutActionConverter() {
-        HashMap<Integer, String> codes = new HashMap<Integer, String>();
+        HashMap<Integer, String> codes = new HashMap<>();
         // map modifiers
         codes.put(ModifierKey.ALT, "alt");
         codes.put(ModifierKey.CTRL, "ctrl");
@@ -112,7 +112,7 @@ public class DesignShortcutActionConverter
 
         keyCodeMap = Collections.unmodifiableMap(codes);
 
-        HashMap<String, Integer> presentations = new HashMap<String, Integer>();
+        HashMap<String, Integer> presentations = new HashMap<>();
         for (Entry<Integer, String> entry : keyCodeMap.entrySet()) {
             presentations.put(entry.getValue(), entry.getKey());
         }
index 1862173aba98d2d3d95685c0e7ffa870fc1c4873..b1010d811d668b68b9ece84f8d77b63e6bf5684e 100644 (file)
@@ -54,8 +54,8 @@ public interface ShortcutKeyMapper extends Serializable {
      */
     public static final ShortcutKeyMapper DEFAULT = new ShortcutKeyMapper() {
 
-        private final Map<Integer, String> keyCodeMap = new ConcurrentHashMap<Integer, String>();
-        private final Map<String, Integer> presentationMap = new ConcurrentHashMap<String, Integer>();
+        private final Map<Integer, String> keyCodeMap = new ConcurrentHashMap<>();
+        private final Map<String, Integer> presentationMap = new ConcurrentHashMap<>();
 
         {
             // map modifiers
index 3cb6a1c4251867c13c4e935dac78078b39f62903..5b5958175bba0df7b3ba9782111ad39f9bbc2436 100644 (file)
@@ -66,7 +66,7 @@ public class ConnectorHelper {
      */
     public static void writeHierarchyInformation(ClientConnector connector,
             StringBuilder builder) {
-        LinkedList<ClientConnector> h = new LinkedList<ClientConnector>();
+        LinkedList<ClientConnector> h = new LinkedList<>();
         h.add(connector);
         ClientConnector parent = connector.getParent();
         while (parent != null) {
index be5300e915371f2c946b1663bd480085ae334d33..f8d6af2a4c5ce61526f0333431ce97a6b5d4dd59 100644 (file)
@@ -72,7 +72,7 @@ public class CurrentInstance implements Serializable {
                 return null;
             }
 
-            Map<Class<?>, CurrentInstance> value = new HashMap<Class<?>, CurrentInstance>();
+            Map<Class<?>, CurrentInstance> value = new HashMap<>();
 
             // Copy all inheritable values to child map
             for (Entry<Class<?>, CurrentInstance> e : parentValue.entrySet()) {
@@ -86,7 +86,7 @@ public class CurrentInstance implements Serializable {
     };
 
     private CurrentInstance(Object instance, boolean inheritable) {
-        this.instance = new WeakReference<Object>(instance);
+        this.instance = new WeakReference<>(instance);
         this.inheritable = inheritable;
     }
 
@@ -200,7 +200,7 @@ public class CurrentInstance implements Serializable {
         } else {
             assert type.isInstance(instance) : "Invald instance type";
             if (map == null) {
-                map = new HashMap<Class<?>, CurrentInstance>();
+                map = new HashMap<>();
                 instances.set(map);
             }
 
@@ -286,7 +286,7 @@ public class CurrentInstance implements Serializable {
         if (map == null) {
             return Collections.emptyMap();
         } else {
-            Map<Class<?>, CurrentInstance> copy = new HashMap<Class<?>, CurrentInstance>();
+            Map<Class<?>, CurrentInstance> copy = new HashMap<>();
             boolean removeStale = false;
             for (Class<?> c : map.keySet()) {
                 CurrentInstance ci = map.get(c);
@@ -338,7 +338,7 @@ public class CurrentInstance implements Serializable {
      */
     public static Map<Class<?>, CurrentInstance> setCurrent(
             VaadinSession session) {
-        Map<Class<?>, CurrentInstance> old = new HashMap<Class<?>, CurrentInstance>();
+        Map<Class<?>, CurrentInstance> old = new HashMap<>();
         old.put(VaadinSession.class, set(VaadinSession.class, session, true));
         VaadinService service = null;
         if (session != null) {
index 7700ff95634164c5fcf557b7ed6914717b5f4ad2..305bc1c5d72700818a3f7ea6095cb6bb24445a33 100644 (file)
@@ -210,12 +210,12 @@ public class FileTypeResolver implements Serializable {
     /**
      * File extension to MIME type mapping. All extensions are in lower case.
      */
-    static private Hashtable<String, String> extToMIMEMap = new Hashtable<String, String>();
+    static private Hashtable<String, String> extToMIMEMap = new Hashtable<>();
 
     /**
      * MIME type to Icon mapping.
      */
-    static private Hashtable<String, Resource> MIMEToIconMap = new Hashtable<String, Resource>();
+    static private Hashtable<String, Resource> MIMEToIconMap = new Hashtable<>();
 
     static {
 
index 4ab9f8e291df5a32ba5991f47e58079ed377efdf..2868f745657557c81da271b1c5ada4c527ba661f 100644 (file)
@@ -91,7 +91,7 @@ public class ResultTest {
 
             @Override
             public <S> Result<S> flatMap(Function<String, Result<S>> mapper) {
-                return new SimpleResult<S>(null, "bar");
+                return new SimpleResult<>(null, "bar");
             }
         };
         Result<String> mapResult = result.map(value -> {
index 167606e19eeed734eec22fb8529e69f11fb97a76..71e3782fcd55b12ce1df14d0fe6afdb3e0f28854 100644 (file)
@@ -41,7 +41,7 @@ public class DragAndDropServiceTest {
 
     @Test
     public void changeVariables_isSourceConnectorEnabledCalled() {
-        final List<Level> levels = new ArrayList<Level>();
+        final List<Level> levels = new ArrayList<>();
         Logger.getLogger(DragAndDropService.class.getName())
                 .addHandler(new StreamHandler() {
                     @Override
@@ -49,7 +49,7 @@ public class DragAndDropServiceTest {
                         levels.add(record.getLevel());
                     }
                 });
-        Map<String, Object> variables = new HashMap<String, Object>();
+        Map<String, Object> variables = new HashMap<>();
         final boolean[] isConnectorEnabledCalled = new boolean[1];
         AbstractComponent component = new AbstractComponent() {
             @Override
@@ -73,7 +73,7 @@ public class DragAndDropServiceTest {
 
     @Test
     public void changeVariables_isTargetConnectorEnabledCalled() {
-        final List<Level> levels = new ArrayList<Level>();
+        final List<Level> levels = new ArrayList<>();
         Logger.getLogger(DragAndDropService.class.getName())
                 .addHandler(new StreamHandler() {
                     @Override
@@ -81,7 +81,7 @@ public class DragAndDropServiceTest {
                         levels.add(record.getLevel());
                     }
                 });
-        Map<String, Object> variables = new HashMap<String, Object>();
+        Map<String, Object> variables = new HashMap<>();
         TestDropTarget target = new TestDropTarget();
         variables.put("dhowner", target);
 
index d145c15329c941bd5169c8d5543f661ec6be16a5..bd60f8f6aa90c8b0818ec162056bd84b3d1426b1 100644 (file)
@@ -48,7 +48,7 @@ public class JSONSerializerTest {
     public void testStringToBeanMapSerialization() throws Exception {
         Type mapType = getClass().getDeclaredField("stringToStateMap")
                 .getGenericType();
-        stringToStateMap = new HashMap<String, AbstractSplitPanelState>();
+        stringToStateMap = new HashMap<>();
         AbstractSplitPanelState s = new AbstractSplitPanelState();
         AbstractSplitPanelState s2 = new AbstractSplitPanelState();
         s.caption = "State 1";
@@ -69,7 +69,7 @@ public class JSONSerializerTest {
     public void testBeanToStringMapSerialization() throws Exception {
         Type mapType = getClass().getDeclaredField("stateToStringMap")
                 .getGenericType();
-        stateToStringMap = new HashMap<AbstractSplitPanelState, String>();
+        stateToStringMap = new HashMap<>();
         AbstractSplitPanelState s = new AbstractSplitPanelState();
         AbstractSplitPanelState s2 = new AbstractSplitPanelState();
         s.caption = "State 1";
index 1a3f949a46d4a352bd9536fc2c8e65cf806f21da..04d516ecb4d62c44795743221934491ebb29691f 100644 (file)
@@ -31,7 +31,7 @@ public class MockVaadinSession extends VaadinSession {
      * chance of leaking memory if the session is not unlocked in the right way,
      * but it should be acceptable for testing use.
      */
-    private static final ThreadLocal<MockVaadinSession> referenceKeeper = new ThreadLocal<MockVaadinSession>();
+    private static final ThreadLocal<MockVaadinSession> referenceKeeper = new ThreadLocal<>();
 
     public MockVaadinSession(VaadinService service) {
         super(service);
index 6bb1e1bd1aaa812dbaa4a1dbc2d413e4311db609..52d58be310b60b77c3bf4f20aa37ba0d8712f114 100644 (file)
@@ -32,7 +32,7 @@ class StrBean implements Serializable {
     }
 
     public static List<StrBean> generateRandomBeans(int max) {
-        List<StrBean> data = new ArrayList<StrBean>();
+        List<StrBean> data = new ArrayList<>();
         Random r = new Random(13337);
         data.add(new StrBean("Xyz", 10, max));
         for (int i = 0; i < max - 1; ++i) {
index ba56fcee35cc27e1a4220d2bd1654711c04a74ca..8c8fbaf7f1d06b15c4ffb59d2cf2fd57a2a05562 100644 (file)
@@ -133,7 +133,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")) {
@@ -169,7 +169,7 @@ public class VaadinClasses {
             throws IOException {
         List<Class<? extends T>> classes = findClasses(baseClass, basePackage,
                 ignoredPackages);
-        List<Class<? extends T>> classesNoTests = new ArrayList<Class<? extends T>>();
+        List<Class<? extends T>> classesNoTests = new ArrayList<>();
         for (Class<? extends T> clazz : classes) {
             if (!clazz.getName().contains("Test")) {
                 boolean testPresent = false;
index d978444c45a19f19e132e1a5dad68b26bab6ab1d..977a96f245cb1afb55fddf5e3831a3379295938a 100644 (file)
@@ -36,7 +36,7 @@ public class ComponentFactoryTest {
     private static final ComponentFactory defaultFactory = Design
             .getComponentFactory();
 
-    private static final ThreadLocal<ComponentFactory> currentComponentFactory = new ThreadLocal<ComponentFactory>();
+    private static final ThreadLocal<ComponentFactory> currentComponentFactory = new ThreadLocal<>();
 
     // Set static component factory that delegate to a thread local factory
     static {
@@ -62,7 +62,7 @@ public class ComponentFactoryTest {
 
     @Test
     public void testComponentFactoryLogging() {
-        final List<String> messages = new ArrayList<String>();
+        final List<String> messages = new ArrayList<>();
         currentComponentFactory.set(new ComponentFactory() {
             @Override
             public Component createComponent(String fullyQualifiedClassName,
@@ -111,7 +111,7 @@ public class ComponentFactoryTest {
 
     @Test
     public void testGetDefaultInstanceUsesComponentFactory() {
-        final List<String> classes = new ArrayList<String>();
+        final List<String> classes = new ArrayList<>();
         currentComponentFactory.set(new ComponentFactory() {
             @Override
             public Component createComponent(String fullyQualifiedClassName,
index 5b4d2344e6241a9263bffeefc8d6bb91a6579d7e..25062f76f4f6eb9cb62936acf85a0f8ffc2a871a 100644 (file)
@@ -33,7 +33,7 @@ public class ComponentMapperTest {
     private static final ComponentMapper defaultMapper = Design
             .getComponentMapper();
 
-    private static final ThreadLocal<ComponentMapper> currentMapper = new ThreadLocal<ComponentMapper>();
+    private static final ThreadLocal<ComponentMapper> currentMapper = new ThreadLocal<>();
 
     static {
         Design.setComponentMapper(new ComponentMapper() {
index bfa0a61a492710bd178112dfe75f608da817e9b3..e488c2f964acae8f31d134216cea6288e6f30385 100644 (file)
@@ -33,7 +33,7 @@ public abstract class DeclarativeTestBase<T extends Component>
 
     private static boolean debug = false;
 
-    private final Map<Class<?>, EqualsAsserter<?>> comparators = new HashMap<Class<?>, EqualsAsserter<?>>();
+    private final Map<Class<?>, EqualsAsserter<?>> comparators = new HashMap<>();
     private static EqualsAsserter standardEqualsComparator = new EqualsAsserter<Object>() {
 
         @Override
index b01c1dc7a4e56c2fea0edd82546c9a05359a09b6..f0bcc8887a4b8d55830c3e6a063dd0c266f0ec55 100644 (file)
@@ -136,7 +136,7 @@ public abstract class DeclarativeTestBaseBase<T extends Component> {
     }
 
     private List<EqualsAsserter<Object>> getComparators(Object o1) {
-        List<EqualsAsserter<Object>> result = new ArrayList<EqualsAsserter<Object>>();
+        List<EqualsAsserter<Object>> result = new ArrayList<>();
         getComparators(o1.getClass(), result);
         return result;
     }
@@ -169,7 +169,7 @@ public abstract class DeclarativeTestBaseBase<T extends Component> {
     }
 
     public static class TestLogHandler {
-        final List<String> messages = new ArrayList<String>();
+        final List<String> messages = new ArrayList<>();
         Handler handler = new Handler() {
             @Override
             public void publish(LogRecord record) {
@@ -258,8 +258,8 @@ public abstract class DeclarativeTestBaseBase<T extends Component> {
      * include close tags
      */
     private String elementToHtml(Element producedElem, StringBuilder sb) {
-        HashSet<String> booleanAttributes = new HashSet<String>();
-        ArrayList<String> names = new ArrayList<String>();
+        HashSet<String> booleanAttributes = new HashSet<>();
+        ArrayList<String> names = new ArrayList<>();
         for (Attribute a : producedElem.attributes().asList()) {
             names.add(a.getKey());
             if (a instanceof BooleanAttribute) {
index b29ddcba7cd1e156125dced97be26f07eadd3d9d..6b7ba963cc879a60d259acf7db7abf9286831212 100644 (file)
@@ -361,7 +361,7 @@ public class DesignFormatterTest {
                 && SharedUtil.equals(other.getIcon(), act.getIcon())
                 && act.getKeyCode() == other.getKeyCode()
                 && act.getModifiers().length == other.getModifiers().length) {
-            HashSet<Integer> thisSet = new HashSet<Integer>(
+            HashSet<Integer> thisSet = new HashSet<>(
                     act.getModifiers().length);
             // this is a bit tricky comparison, but there is no nice way of
             // making int[] into a Set
index 6c542a411e7ae0c64c3bc02e60c955bdf906e717..86fb273841956802a88e84d71409e38996bb3ac0 100644 (file)
@@ -55,7 +55,7 @@ public class DesignReadInConstructorTest {
     private void assertJsoupTreeEquals(Element expected, Element actual) {
         Assert.assertEquals(expected.tagName(), actual.tagName());
 
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
 
         for (Attribute attr : expected.attributes().asList()) {
             keys.add(attr.getKey());
index 5b5028c81a1d2fa6e5cedcd7beabe7101143220f..90bc775efa15dd8f3800d40e9076ac04a27990f4 100644 (file)
@@ -39,7 +39,7 @@ public class ShortcutActionTest {
 
     @Test
     public void testHashCodeUniqueness() {
-        HashSet<ShortcutAction> set = new HashSet<ShortcutAction>();
+        HashSet<ShortcutAction> set = new HashSet<>();
         for (String modifier : new String[] { "^", "&", "_", "&^", "&_", "_^",
                 "&^_" }) {
             for (String key : KEYS) {
@@ -98,7 +98,7 @@ public class ShortcutActionTest {
                 && SharedUtil.equals(other.getIcon(), act.getIcon())
                 && act.getKeyCode() == other.getKeyCode()
                 && act.getModifiers().length == other.getModifiers().length) {
-            HashSet<Integer> thisSet = new HashSet<Integer>(
+            HashSet<Integer> thisSet = new HashSet<>(
                     act.getModifiers().length);
             // this is a bit tricky comparison, but there is no nice way of
             // making int[] into a Set
index 02e2e220a6b7fb750b1c10b4341c25aace01052e..964ba585eb6f1315ef6e4729661a7dc4e48d36e7 100644 (file)
@@ -93,12 +93,12 @@ public class ClassesSerializableTest {
     public void testClassesSerializable() throws Exception {
         List<String> rawClasspathEntries = getRawClasspathEntries();
 
-        List<String> classes = new ArrayList<String>();
+        List<String> classes = new ArrayList<>();
         for (String location : rawClasspathEntries) {
             classes.addAll(findServerClasses(location));
         }
 
-        ArrayList<Class<?>> nonSerializableClasses = new ArrayList<Class<?>>();
+        ArrayList<Class<?>> nonSerializableClasses = new ArrayList<>();
         for (String className : classes) {
             Class<?> cls = Class.forName(className);
             // skip annotations and synthetic classes
@@ -183,7 +183,7 @@ public class ClassesSerializableTest {
     //
     private final static List<String> getRawClasspathEntries() {
         // try to keep the order of the classpath
-        List<String> locations = new ArrayList<String>();
+        List<String> locations = new ArrayList<>();
 
         String pathSep = System.getProperty("path.separator");
         String classpath = System.getProperty("java.class.path");
@@ -217,7 +217,7 @@ public class ClassesSerializableTest {
      */
     private List<String> findServerClasses(String classpathEntry)
             throws IOException {
-        Collection<String> classes = new ArrayList<String>();
+        Collection<String> classes = new ArrayList<>();
 
         File file = new File(classpathEntry);
         if (file.isDirectory()) {
@@ -229,7 +229,7 @@ public class ClassesSerializableTest {
             return Collections.emptyList();
         }
 
-        List<String> filteredClasses = new ArrayList<String>();
+        List<String> filteredClasses = new ArrayList<>();
         for (String className : classes) {
             boolean ok = false;
             for (String basePackage : BASE_PACKAGES) {
@@ -267,7 +267,7 @@ public class ClassesSerializableTest {
      * @throws IOException
      */
     private Collection<String> findClassesInJar(File file) throws IOException {
-        Collection<String> classes = new ArrayList<String>();
+        Collection<String> classes = new ArrayList<>();
 
         JarFile jar = new JarFile(file);
         Enumeration<JarEntry> e = jar.entries();
@@ -307,7 +307,7 @@ public class ClassesSerializableTest {
             parentPackage += ".";
         }
 
-        Collection<String> classNames = new ArrayList<String>();
+        Collection<String> classNames = new ArrayList<>();
 
         // add all directories recursively
         File[] files = parent.listFiles();
index 7ca3c61a557fbd8e8993055e7d4614beeba767f9..5b882ac7b3fdb50c687c049c978df0c45af61135 100644 (file)
@@ -15,7 +15,7 @@ public class KeyMapperTest {
 
     @Test
     public void testAdd() {
-        KeyMapper<Object> mapper = new KeyMapper<Object>();
+        KeyMapper<Object> mapper = new KeyMapper<>();
         Object o1 = new Object();
         Object o2 = new Object();
         Object o3 = new Object();
@@ -47,7 +47,7 @@ public class KeyMapperTest {
 
     @Test
     public void testRemoveAll() {
-        KeyMapper<Object> mapper = new KeyMapper<Object>();
+        KeyMapper<Object> mapper = new KeyMapper<>();
         Object o1 = new Object();
         Object o2 = new Object();
         Object o3 = new Object();
@@ -65,7 +65,7 @@ public class KeyMapperTest {
 
     @Test
     public void testRemove() {
-        KeyMapper<Object> mapper = new KeyMapper<Object>();
+        KeyMapper<Object> mapper = new KeyMapper<>();
         Object o1 = new Object();
         Object o2 = new Object();
         Object o3 = new Object();
index e4377089925109ca65de5abe0ed4c0311ce9d03f..75ab52370db42413fbd464b8704e969bee7b6213 100644 (file)
@@ -174,7 +174,7 @@ public class AttachDetachListenersTest {
     }
 
     public static <E extends ConnectorEvent> E eventEquals(E expected) {
-        EasyMock.reportMatcher(new EventEquals<E>(expected));
+        EasyMock.reportMatcher(new EventEquals<>(expected));
         return null;
     }
 
index b3a28426561694ab35414e0ef7210eb2d7084511..8f1c54ff6f6371541a61b23fd96a0a7ac1ed2770 100644 (file)
@@ -19,7 +19,7 @@ public abstract class AbstractListenerMethodsTestBase {
     }
 
     private static void findAllListenerMethods() {
-        Set<Class<?>> classes = new HashSet<Class<?>>();
+        Set<Class<?>> classes = new HashSet<>();
         for (Class<?> c : VaadinClasses.getAllServerSideClasses()) {
             while (c != null && c.getName().startsWith("com.vaadin.")) {
                 classes.add(c);
index 6dd451ac2a156bcde13aa2e1c1bfc8f6268f42a4..5519163012bba093cb3aee41db95977096a2214a 100644 (file)
@@ -22,7 +22,7 @@ public class FinalMethodTest {
 
     @Test
     public void testThatComponentsHaveNoFinalMethods() {
-        HashSet<Class<?>> tested = new HashSet<Class<?>>();
+        HashSet<Class<?>> tested = new HashSet<>();
         for (Class<? extends Component> c : VaadinClasses.getComponents()) {
             ensureNoFinalMethods(c, tested);
         }
index 07a7afbfe5e4716177ac389901acb3ed458e499a..57647f1e6a0818b837aa60ee503962b019272071 100644 (file)
@@ -19,7 +19,7 @@ import com.vaadin.ui.UI;
 
 public class StateGetDoesNotMarkDirtyTest {
 
-    private Set<String> excludedMethods = new HashSet<String>();
+    private Set<String> excludedMethods = new HashSet<>();
 
     @Before
     public void setUp() {
@@ -33,7 +33,7 @@ public class StateGetDoesNotMarkDirtyTest {
             Component newInstance = construct(c);
             prepareMockUI(newInstance);
 
-            Set<Method> methods = new HashSet<Method>();
+            Set<Method> methods = new HashSet<>();
             methods.addAll(Arrays.asList(c.getMethods()));
             methods.addAll(Arrays.asList(c.getDeclaredMethods()));
             for (Method method : methods) {
index 0f1905ea02a6eac904c25fe88727f3b1bc7c7d64..1c3b68e5fc462ebd4364795cf791defb9869955d 100644 (file)
@@ -60,7 +60,7 @@ public class CustomLayoutTest {
 
     private Integer getBufferSize() throws IllegalAccessException {
         Field[] fields = CustomLayout.class.getDeclaredFields();
-        List<Field> list = new ArrayList<Field>(fields.length);
+        List<Field> list = new ArrayList<>(fields.length);
         for (Field field : fields) {
             if ((field.getModifiers() & Modifier.STATIC) > 0) {
                 list.add(field);
index a23c60b106e49e1f737c6942f304ba444afcde4e..2fb7702aeb8011fd6fdad09779b775a89aeb4390 100644 (file)
@@ -13,7 +13,7 @@ public class ResolutionTest {
     public void testResolutionHigherOrEqualToYear() {
         Iterable<Resolution> higherOrEqual = Resolution
                 .getResolutionsHigherOrEqualTo(Resolution.YEAR);
-        ArrayList<Resolution> expected = new ArrayList<Resolution>();
+        ArrayList<Resolution> expected = new ArrayList<>();
         expected.add(Resolution.YEAR);
         TestUtil.assertIterableEquals(expected, higherOrEqual);
     }
@@ -22,7 +22,7 @@ public class ResolutionTest {
     public void testResolutionHigherOrEqualToDay() {
         Iterable<Resolution> higherOrEqual = Resolution
                 .getResolutionsHigherOrEqualTo(Resolution.DAY);
-        ArrayList<Resolution> expected = new ArrayList<Resolution>();
+        ArrayList<Resolution> expected = new ArrayList<>();
         expected.add(Resolution.DAY);
         expected.add(Resolution.MONTH);
         expected.add(Resolution.YEAR);
@@ -34,7 +34,7 @@ public class ResolutionTest {
     public void testResolutionLowerThanDay() {
         Iterable<Resolution> higherOrEqual = Resolution
                 .getResolutionsLowerThan(Resolution.DAY);
-        ArrayList<Resolution> expected = new ArrayList<Resolution>();
+        ArrayList<Resolution> expected = new ArrayList<>();
         expected.add(Resolution.HOUR);
         expected.add(Resolution.MINUTE);
         expected.add(Resolution.SECOND);
@@ -46,7 +46,7 @@ public class ResolutionTest {
     public void testResolutionLowerThanSecond() {
         Iterable<Resolution> higherOrEqual = Resolution
                 .getResolutionsLowerThan(Resolution.SECOND);
-        ArrayList<Resolution> expected = new ArrayList<Resolution>();
+        ArrayList<Resolution> expected = new ArrayList<>();
         TestUtil.assertIterableEquals(expected, higherOrEqual);
     }
 
@@ -54,7 +54,7 @@ public class ResolutionTest {
     public void testResolutionLowerThanYear() {
         Iterable<Resolution> higherOrEqual = Resolution
                 .getResolutionsLowerThan(Resolution.YEAR);
-        ArrayList<Resolution> expected = new ArrayList<Resolution>();
+        ArrayList<Resolution> expected = new ArrayList<>();
         expected.add(Resolution.MONTH);
         expected.add(Resolution.DAY);
         expected.add(Resolution.HOUR);
index 105cf6660aee75ae130bcc70b58eb8a52b4f34cc..f42b9a5683ef3ac342d578c06f3a842bd189073b 100644 (file)
@@ -23,7 +23,7 @@ public class MenuBarIdsTest implements Command {
     private MenuItem menuFileOpen;
     private MenuItem menuFileSave;
     private MenuItem menuFileExit;
-    private Set<MenuItem> menuItems = new HashSet<MenuItem>();
+    private Set<MenuItem> menuItems = new HashSet<>();
 
     private MenuBar menuBar;
 
@@ -71,7 +71,7 @@ public class MenuBarIdsTest implements Command {
 
     private static void assertUniqueIds(MenuBar menuBar) {
 
-        Set<Object> ids = new HashSet<Object>();
+        Set<Object> ids = new HashSet<>();
 
         for (MenuItem item : menuBar.getItems()) {
             assertUniqueIds(ids, item);
index a7392be3da4d3c8fda193df7021aeab3833827c2..f7a78b34ec5c14ad0ad7780b051e347ff886e6fe 100644 (file)
@@ -37,7 +37,7 @@ public class CustomUIClassLoaderTest {
      */
     public class LoggingClassLoader extends ClassLoader {
 
-        private List<String> requestedClasses = new ArrayList<String>();
+        private List<String> requestedClasses = new ArrayList<>();
 
         @Override
         protected synchronized Class<?> loadClass(String name, boolean resolve)
index ed22870b59977a9c9c83b0714716581c41f1f938..a38ba9b0f957884cb6517f8188988204b21e9c28 100644 (file)
@@ -80,14 +80,14 @@ public class WindowTest {
     }
 
     private void sendResize(Window window2) {
-        Map<String, Object> variables = new HashMap<String, Object>();
+        Map<String, Object> variables = new HashMap<>();
         variables.put("height", 1234);
         window.changeVariables(window, variables);
 
     }
 
     private static void sendClose(Window window) {
-        Map<String, Object> variables = new HashMap<String, Object>();
+        Map<String, Object> variables = new HashMap<>();
         variables.put("close", true);
         window.changeVariables(window, variables);
     }
index 5f676cbcbdda78ad1fe47c7eb86a47c6628f1de8..c7bb725cc9e02372d517bf6890ed23644ce89246 100644 (file)
@@ -114,9 +114,9 @@ public class NavigatorTest {
     }
 
     public static class ViewChangeTestListener implements ViewChangeListener {
-        private final LinkedList<ViewChangeEvent> referenceEvents = new LinkedList<ViewChangeListener.ViewChangeEvent>();
-        private final LinkedList<Boolean> referenceIsCheck = new LinkedList<Boolean>();
-        private final LinkedList<Boolean> checkReturnValues = new LinkedList<Boolean>();
+        private final LinkedList<ViewChangeEvent> referenceEvents = new LinkedList<>();
+        private final LinkedList<Boolean> referenceIsCheck = new LinkedList<>();
+        private final LinkedList<Boolean> checkReturnValues = new LinkedList<>();
 
         public void addExpectedIsViewChangeAllowed(ViewChangeEvent event,
                 boolean returnValue) {
index d621c0d2b436563ef05b753bfc710620f26078ab..c322eb7ed8728a06bc6aa3faa9a957609d0185ad 100644 (file)
@@ -26,12 +26,12 @@ public class GraphVizClassHierarchyCreator {
 
         StringBuilder sb = new StringBuilder();
 
-        Set<Class> classesAndParents = new HashSet<Class>();
+        Set<Class> classesAndParents = new HashSet<>();
         for (Class<?> cls : classes) {
             addClassAndParents(classesAndParents, cls, packageToInclude);
         }
 
-        Set<Class> interfaces = new HashSet<Class>();
+        Set<Class> interfaces = new HashSet<>();
         for (Object cls : classesAndParents.toArray()) {
             for (Class<?> c : ((Class) cls).getInterfaces()) {
                 addClassAndParentInterfaces(classesAndParents, c,
index b4bf571fd074a954cc0223817629706aa8312326..e4665adf522d2d5c58cbd139bf57440f8245ceeb 100644 (file)
@@ -18,7 +18,7 @@ public class MockDeploymentConfiguration
     private boolean closeIdleSessions = false;
     private PushMode pushMode = PushMode.DISABLED;
     private Properties initParameters = new Properties();
-    private Map<String, String> applicationOrSystemProperty = new HashMap<String, String>();
+    private Map<String, String> applicationOrSystemProperty = new HashMap<>();
     private boolean syncIdCheckEnabled = true;
     private boolean sendUrlsAsParameters = true;
 
index fefa615a91923c237e36169d6a4cebd927fd2f1a..0d698b19e864dd1c51f15f8a02518d75f759aca6 100644 (file)
@@ -223,7 +223,7 @@ public class CurrentInstanceTest {
                 .setCurrent(session2);
 
         // Use weak ref to verify object is collected
-        WeakReference<VaadinSession> ref = new WeakReference<VaadinSession>(
+        WeakReference<VaadinSession> ref = new WeakReference<>(
                 session1);
 
         session1 = null;
index 52b8ce895d3ce1b60b74ddb70cd402b241dd6b9c..a37e4538356224c2d52f64d51ec665030adcd319 100644 (file)
@@ -26,8 +26,8 @@ import com.vaadin.shared.communication.SharedState;
 public class JavaScriptExtensionState extends SharedState
         implements JavaScriptConnectorState {
 
-    private Set<String> callbackNames = new HashSet<String>();
-    private Map<String, Set<String>> rpcInterfaces = new HashMap<String, Set<String>>();
+    private Set<String> callbackNames = new HashSet<>();
+    private Map<String, Set<String>> rpcInterfaces = new HashMap<>();
 
     @Override
     public Set<String> getCallbackNames() {
index 818c292fa400d04acc65cc63460a680fb057a0de..0e2dc2c84186c658cebe2f628cb7429b93c79be7 100644 (file)
@@ -21,7 +21,7 @@ import java.util.Map;
 import com.vaadin.shared.ApplicationConstants;
 
 public class LegacyChangeVariablesInvocation extends MethodInvocation {
-    private Map<String, Object> variableChanges = new HashMap<String, Object>();
+    private Map<String, Object> variableChanges = new HashMap<>();
 
     public LegacyChangeVariablesInvocation(String connectorId,
             String variableName, Object value) {
index 6506d0a7cab5c606b96003acdd9104b9c2ded77a..6b9c1045c5dd942bb8c938084f752545e81c6c66 100644 (file)
@@ -59,7 +59,7 @@ public class SharedState implements Serializable {
      *      com.vaadin.server.Resource)
      * @see com.vaadin.client.ui.AbstractConnector#getResourceUrl(String)
      */
-    public Map<String, URLReference> resources = new HashMap<String, URLReference>();
+    public Map<String, URLReference> resources = new HashMap<>();
 
     public boolean enabled = true;
     /**
index 15a89a6699b0bda8bd692a6637622aa19bacf85b..5abf858f420e9424e5c56840d6641e5b82e17b93 100644 (file)
@@ -22,5 +22,5 @@ import java.util.Set;
 import com.vaadin.shared.communication.SharedState;
 
 public class JavaScriptManagerState extends SharedState {
-    public Set<String> names = new HashSet<String>();
+    public Set<String> names = new HashSet<>();
 }
index 54ec61f93a0a43dadd4e82b3a7da9397f87b7521..d7cddf566aaf7628644c2bf162df59e5716ebe74 100644 (file)
@@ -36,7 +36,7 @@ public class AbstractMediaState extends AbstractComponentState {
     @NoLayout
     public boolean muted;
 
-    public List<URLReference> sources = new ArrayList<URLReference>();
+    public List<URLReference> sources = new ArrayList<>();
 
-    public List<String> sourceTypes = new ArrayList<String>();
+    public List<String> sourceTypes = new ArrayList<>();
 }
index 25cee8a587b7c883266b602c4aee4e7dace50f32..f1a4ea9be3a7d41866427d82c1260b67c73643b4 100644 (file)
@@ -30,6 +30,6 @@ public class BrowserWindowOpenerState extends AbstractComponentState {
 
     public String uriFragment;
 
-    public Map<String, String> parameters = new HashMap<String, String>();
+    public Map<String, String> parameters = new HashMap<>();
 
 }
index e18060e3bc0b31a1169b1590592c20bc04e94113..a38b828471303fb94f8273e2e4882f41d0a011e7 100644 (file)
@@ -78,7 +78,7 @@ public final class ComponentStateUtil implements Serializable {
     public static final void addRegisteredEventListener(SharedState state,
             String eventListenerId) {
         if (state.registeredEventListeners == null) {
-            state.registeredEventListeners = new HashSet<String>();
+            state.registeredEventListeners = new HashSet<>();
         }
         state.registeredEventListeners.add(eventListenerId);
     }
index 0cfecee0872304b54038aed6972ae7e716f31cd9..cb655925169462bb97dc824eebbd1c093ea22429 100644 (file)
@@ -27,8 +27,8 @@ import com.vaadin.shared.JavaScriptConnectorState;
 public class JavaScriptComponentState extends AbstractComponentState
         implements JavaScriptConnectorState {
 
-    private Set<String> callbackNames = new HashSet<String>();
-    private Map<String, Set<String>> rpcInterfaces = new HashMap<String, Set<String>>();
+    private Set<String> callbackNames = new HashSet<>();
+    private Map<String, Set<String>> rpcInterfaces = new HashMap<>();
 
     @Override
     public Set<String> getCallbackNames() {
index a30482b4e7862a0a766b4e4030c73de56fbbbcef..f304ccad12162d2b65c1393840538ec704c263b8 100644 (file)
@@ -26,5 +26,5 @@ public class AbsoluteLayoutState extends AbstractLayoutState {
     }
 
     // Maps each component to a position
-    public Map<String, String> connectorToCssPosition = new HashMap<String, String>();
+    public Map<String, String> connectorToCssPosition = new HashMap<>();
 }
index 21c97a93f9f3056e035d79595017ca11e044008f..eefc280649fd132256507c5f66b4cf14a4c54f7d 100644 (file)
@@ -25,5 +25,5 @@ public class CssLayoutState extends AbstractLayoutState {
     {
         primaryStyleName = "v-csslayout";
     }
-    public Map<Connector, String> childCss = new HashMap<Connector, String>();
+    public Map<Connector, String> childCss = new HashMap<>();
 }
index 982393b21bab07aa740f5d1fa62ede18d0b44f8d..184346b9b7520442665d12a3360ebf8e402c1d5b 100644 (file)
@@ -25,7 +25,7 @@ public class CustomLayoutState extends AbstractLayoutState {
     {
         primaryStyleName = "v-customlayout";
     }
-    public Map<Connector, String> childLocations = new HashMap<Connector, String>();
+    public Map<Connector, String> childLocations = new HashMap<>();
     public String templateContents;
     public String templateName;
 }
index 344953d59134de1644f0ab5dec0f5481a9f05cba..93dbb7ab837e5dca3cc3ef4f77976acf1937877f 100644 (file)
@@ -56,7 +56,7 @@ public enum Resolution {
      */
     public static Iterable<Resolution> getResolutionsHigherOrEqualTo(
             Resolution r) {
-        List<Resolution> resolutions = new ArrayList<Resolution>();
+        List<Resolution> resolutions = new ArrayList<>();
         Resolution[] values = Resolution.values();
         for (int i = r.ordinal(); i < values.length; i++) {
             resolutions.add(values[i]);
@@ -74,7 +74,7 @@ public enum Resolution {
      * @return An iterable for the resolutions lower than r
      */
     public static List<Resolution> getResolutionsLowerThan(Resolution r) {
-        List<Resolution> resolutions = new ArrayList<Resolution>();
+        List<Resolution> resolutions = new ArrayList<>();
         Resolution[] values = Resolution.values();
         for (int i = r.ordinal() - 1; i >= 0; i--) {
             resolutions.add(values[i]);
index add8eb8938d72bbb50829cdea76dfd6341418b81..15e17b5ab83c4c36591816c123394176a637f4c8 100644 (file)
@@ -102,7 +102,7 @@ public class GridState extends TabIndexState {
     /**
      * Column order in grid.
      */
-    public List<String> columnOrder = new ArrayList<String>();
+    public List<String> columnOrder = new ArrayList<>();
 
     /** The number of frozen columns. */
     @DelegateToWidget
index 000e396e127da910383891a5fa6318c64780632c..c38c76852a62230abbf911bbfa81383fc62f616c 100644 (file)
@@ -36,9 +36,9 @@ public class GridLayoutState extends AbstractLayoutState {
     public int columns = 0;
     public int marginsBitmask = 0;
     // Set of indexes of implicitly Ratios rows and columns
-    public Set<Integer> explicitRowRatios = new HashSet<Integer>();;
-    public Set<Integer> explicitColRatios = new HashSet<Integer>();
-    public Map<Connector, ChildComponentData> childData = new HashMap<Connector, GridLayoutState.ChildComponentData>();
+    public Set<Integer> explicitRowRatios = new HashSet<>();;
+    public Set<Integer> explicitColRatios = new HashSet<>();
+    public Map<Connector, ChildComponentData> childData = new HashMap<>();
     public boolean hideEmptyRowsAndColumns = false;
     public float[] rowExpand;
     public float[] colExpand;
index a5d2d3a89cb4fda9ffd30ee82ca9b71217122e03..fb8d4b9301c9abf3e076e06b0402bdb108c4ddba 100644 (file)
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.AlignmentInfo;
 public class AbstractOrderedLayoutState extends AbstractLayoutState {
     public boolean spacing = false;
 
-    public HashMap<Connector, ChildComponentData> childData = new HashMap<Connector, ChildComponentData>();
+    public HashMap<Connector, ChildComponentData> childData = new HashMap<>();
 
     public int marginsBitmask = 0;
 
index de39a6343806a9aa42daca67ebefcede74e590f0..f1b01fc076b4f240cdc869891d6c9412ca1aa92c 100644 (file)
@@ -36,7 +36,7 @@ public class TabsheetState extends AbstractComponentState {
     @NoLayout
     public int tabIndex;
 
-    public List<TabState> tabs = new ArrayList<TabState>();
+    public List<TabState> tabs = new ArrayList<>();
 
     /** true to show the tab bar, false to only show the contained component */
     public boolean tabsVisible = true;
index cc43ddb9385307a3a5996b44d5ebe76c46ec6059..82054e1d30cf98465b178d6a3c54221602c9711f 100644 (file)
@@ -32,7 +32,7 @@ public class UIState extends TabIndexState {
     // Informing users of assistive devices, that the content of this container
     // is announced automatically and does not need to be navigated into
     public String overlayContainerLabel = "This content is announced automatically and does not need to be navigated into.";
-    public Map<String, NotificationTypeConfiguration> notificationConfigurations = new HashMap<String, NotificationTypeConfiguration>();
+    public Map<String, NotificationTypeConfiguration> notificationConfigurations = new HashMap<>();
     {
         notificationConfigurations.put("error",
                 new NotificationTypeConfiguration("Error: ",
@@ -117,7 +117,7 @@ public class UIState extends TabIndexState {
         public boolean alwaysUseXhrForServerRequests = false;
         public PushMode mode = PushMode.DISABLED;
         public String pushUrl = null;
-        public Map<String, String> parameters = new HashMap<String, String>();
+        public Map<String, String> parameters = new HashMap<>();
         {
             parameters.put(TRANSPORT_PARAM,
                     Transport.WEBSOCKET.getIdentifier());
@@ -137,7 +137,7 @@ public class UIState extends TabIndexState {
     }
 
     public static class LocaleServiceState implements Serializable {
-        public List<LocaleData> localeData = new ArrayList<LocaleData>();
+        public List<LocaleData> localeData = new ArrayList<>();
     }
 
     public static class LocaleData implements Serializable {
index 1c9982886d6c22261c740df23f83bf116e1d8240..dbfda17bfdd91fe4123ee9a093223283058e9da8 100644 (file)
@@ -260,7 +260,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
      * {@link #isPush()}.
      */
     protected void openTestURL(Class<?> uiClass, String... parameters) {
-        openTestURL(uiClass, new HashSet<String>(Arrays.asList(parameters)));
+        openTestURL(uiClass, new HashSet<>(Arrays.asList(parameters)));
     }
 
     private void openTestURL(Class<?> uiClass, Set<String> parameters) {
@@ -979,7 +979,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
     protected List<String> getLogs() {
         VerticalLayoutElement log = $(VerticalLayoutElement.class).id("Log");
         List<LabelElement> logLabels = log.$(LabelElement.class).all();
-        List<String> logTexts = new ArrayList<String>();
+        List<String> logTexts = new ArrayList<>();
 
         for (LabelElement label : logLabels) {
             logTexts.add(label.getText());
index cef11a69bdcfa06349a4aa76a9d9b7976f1d183a..1193ba9334cdaf785254ccbc1d36307a6e30c868 100644 (file)
@@ -97,7 +97,7 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
 
     protected List<DesiredCapabilities> getBrowserCapabilities(
             Browser... browsers) {
-        List<DesiredCapabilities> capabilities = new ArrayList<DesiredCapabilities>();
+        List<DesiredCapabilities> capabilities = new ArrayList<>();
         for (Browser browser : browsers) {
             capabilities.add(browser.getDesiredCapabilities());
         }
index 100ee83918b8a67296f818b14c0df5e34b4f3251..e270e26c5318dd91245a5fbe74e7b6c24b9a36d8 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.runners.model.RunnerScheduler;
  * @author Vaadin Ltd
  */
 public class ParallelScheduler implements RunnerScheduler {
-    private final List<Future<Object>> fResults = new ArrayList<Future<Object>>();
+    private final List<Future<Object>> fResults = new ArrayList<>();
     private ExecutorService fService;
 
     /**
index 83aba8a3f9cd84c8606b330b569a0c75315994db..25261584d2272f34f7915b9c311c0465024227ae 100644 (file)
@@ -48,7 +48,7 @@ public class ParameterizedTB3Runner extends TB3Runner {
     protected List<FrameworkMethod> computeTestMethods() {
         List<FrameworkMethod> methods = super.computeTestMethods();
 
-        Map<Method, Collection<String>> parameters = new LinkedHashMap<Method, Collection<String>>();
+        Map<Method, Collection<String>> parameters = new LinkedHashMap<>();
 
         // Find all @Parameters methods and invoke them to find out permutations
 
@@ -108,7 +108,7 @@ public class ParameterizedTB3Runner extends TB3Runner {
 
         // Add method permutations for all @Parameters
         for (Method setter : parameters.keySet()) {
-            List<FrameworkMethod> newMethods = new ArrayList<FrameworkMethod>();
+            List<FrameworkMethod> newMethods = new ArrayList<>();
             for (FrameworkMethod m : methods) {
 
                 if (!(m instanceof TBMethod)) {
index aea24c67274399fac99e4e125f8383ea22fcea0c..ffc4ec9043f93120375acf6747e9bb885dc6cec8 100644 (file)
@@ -98,7 +98,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
      */
     @Before
     public void setupScreenComparisonParameters() {
-        screenshotFailures = new ArrayList<String>();
+        screenshotFailures = new ArrayList<>();
 
         Parameters.setScreenshotErrorDirectory(getScreenshotErrorDirectory());
         Parameters.setScreenshotReferenceDirectory(
@@ -133,7 +133,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
         File mainReference = getScreenshotReferenceFile(identifier);
 
         List<File> referenceFiles = findReferenceAndAlternatives(mainReference);
-        List<File> failedReferenceFiles = new ArrayList<File>();
+        List<File> failedReferenceFiles = new ArrayList<>();
 
         for (File referenceFile : referenceFiles) {
             boolean match = false;
@@ -275,7 +275,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
      *         given files, including the given reference
      */
     private List<File> findReferenceAndAlternatives(File reference) {
-        List<File> files = new ArrayList<File>();
+        List<File> files = new ArrayList<>();
         files.add(reference);
 
         File screenshotDir = reference.getParentFile();
index 5733ac4f277a3a78321cbe63ec1a4b19e8ee03b3..86354774912caaeee7ade4aa8e61f86c56768165 100644 (file)
@@ -67,7 +67,7 @@ public class TB3TestLocator {
      */
     protected <T> List<Class<? extends T>> findClasses(Class<T> baseClass,
             String basePackage, String[] ignoredPackages) throws IOException {
-        List<Class<? extends T>> classes = new ArrayList<Class<? extends T>>();
+        List<Class<? extends T>> classes = new ArrayList<>();
         String basePackageDirName = "/" + basePackage.replace('.', '/');
         URL location = baseClass.getResource(basePackageDirName);
         if (location.getProtocol().equals("file")) {
index b4ac8d5425bc94e69c29040d1f3da31af6554ed6..61087550583f1be45ffdba62453430a7b702968f 100644 (file)
@@ -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;
index d8319e6516b55437a2d44d80f77b637bd3657ff6..63ecc3c8dbd5c8d536409db03a934cf9c8ccf73e 100644 (file)
@@ -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("--")) {
index 857966af9cc8f6eed4eca682593ca119fc4f2f84..419fe1213c01e9235f97fb522c1a730284efeefc 100644 (file)
@@ -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));
index d16afa123283c954de30f7739bec77dc45d16ea0..eea70f6ad1a7d9c92d20038f1ed748b1caea7410 100644 (file)
@@ -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);
         }
index 915e120a7aa168086c011b1162cc5c38c21e5800..3e885f1078bb6cead75e14c1d7fd70da46054128 100644 (file)
@@ -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() {
index e6f0405bf4005ed58db3674af27f6b6888548894..0dbe05fdeef1a671a4e556058cff882af11cadb4 100644 (file)
@@ -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() {
 
index 3b045eb50b579ae42eb662a682fadaa525ccfe50..3e17dc99f15e151d5cc78345d27e04d1577a2b3e 100644 (file)
@@ -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());
             }
index f904925f1da3ec75e8ed54613f0e06986ce890c7..2f77086ed7fb96f8ae49d8687bd0002ed8d56841 100644 (file)
@@ -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();
index 27c93ad42643532d53eedac8408f6d3b26b222e5..ce044db4a5d389451ec9ecc2ee26244971b43b34 100644 (file)
@@ -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());
         }
index 3757a1382980fde863886f208305d57902a496a6..eec5bcd27d836892476c29203cdfed78e87e0548 100644 (file)
@@ -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());
         }
index c1face8492a34e4f06da53d2fa6d06d149128be4..47bc0413b7f22e8c624bebf598f95c5c62ea6c9e 100644 (file)
@@ -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]);
index 0cb616d08471983e754540a6cae44325b6dced6e..2d2131a235395924b7a5f4582814cf134f38e750 100644 (file)
@@ -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());
             }
index 73da774a54b7e3c60fd6474859d35b5764ae7a36..04e3104b79d49cee9e4ef42a7059cc078da2a9d7 100644 (file)
@@ -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);
 
index 48287f6945d47d31249a94ba7a83cfbd3b5568ec..80dbee4cfb073ed5019355d337eec69c4f58f6a0 100644 (file)
@@ -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"));
index 92dda09f972029c5ca52d2fdf361af1bf6ad8361..6cde8350ed5be48664747d6e0c6baa950c14eae8 100644 (file)
@@ -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;
index d2058fd88616544eb6bf8fd5bc397c1804aecc67..28cfabbc43c960276c0d06b63d6a68dcfff7639d 100644 (file)
@@ -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);
 
index dc09e7cc0cbf7efea99c428a38fc007cf5a6948b..bee83d8e011f41609dd10a1b5425ffc6c5bb0b35 100644 (file)
@@ -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")) {
index fae301860b0c294582afc55cf23608e4aee8ba75..c2df4fe38e3e09e6e5af2a80058caa33b0ffb962 100644 (file)
@@ -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)
index 8ca03ca86081f410c37236628f31ade52b0ca000..a93fadeba4e3e971c265ff7fa1cbadfa1df24008 100644 (file)
@@ -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);
index 5720834bd1bed0d5523e5e7fee4f0c5e9c106b79..ef0a2731725119de23e71456c7f1c5d538312710 100644 (file)
@@ -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");
 
index a3b432800c7ecfca1e7aad864fbfd12a69cf2581..2c51bd132d7173ee6742b54c00468f4dd5504369 100644 (file)
@@ -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);
index 3e25b018939d8bd25f8142d8ad6881774a5fb74c..bdb1ff3f836486fa9b00a4c8f0864e5c17b98bed 100644 (file)
@@ -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();
 
index 525e28b41d4730c5432d847b923b5b3463e485de..82fbaee568b1bb65aa825c0c88758ac665806b9b 100644 (file)
@@ -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);
index b3454144596044b9e1dd05ddb0434d94a4dabfd8..0e91dd91098aebb976f914d56335acd4a2bff1c0 100644 (file)
@@ -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++) {
index 5c73c851a5e23478d5dfe2a78b512582f3c2f1f7..2786eb85589643b56e70cef0a84bcacd942b57e1 100644 (file)
@@ -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));
index 59b1e864835719fd80e197a22debd2d740a44188..898c1014fca323ae6919c6436c9fef0401fedc6e 100644 (file)
@@ -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));
index 29c8ab5eaa1579198d3d441157d18054e3f180e1..141ef664b4e262b957657a463d8ccb21bd6743de 100644 (file)
@@ -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);
index d42dce8512a885efd0960468fd8651e7f451a977..7f633c307c9648fb5e934577e8504c426d9967d1 100644 (file)
@@ -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) {
index 763d7752b8c10e9f7c9b34a1e625019c48ed54fc..db6479bb0ea09df42b8e212a7adabc8c2403bd7d 100644 (file)
@@ -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) {
index feaa1371ecb5ddffcfcd70873159cd5abf608b07..a9256e68e76208b160450a254b8cb87c955386d1 100644 (file)
@@ -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);
index 27f15cee3f6d56d3c446d0e05c42e9bc2b186f25..1f69c96be3c12cd86b0d8943a9e859065d03ff03 100644 (file)
@@ -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() {
index a3595b36b53f39c330479ea5240df7169c318539..384b8be17a72a62a937a9c64964d0c5c802a7435 100644 (file)
@@ -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));
 
     }
index b4a2906576f93a9ffc49e1dae3c8e07c492527c7..b9fb03ad8f0315220d03030c94bdb46d94967b14 100644 (file)
@@ -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());
index f436c4aca3ff28d2d03f80d51f4b54eacfc7e6ec..d5b8bdbb6891ab1a0377dac0f06cbac61464a359 100644 (file)
@@ -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() {
 
index 7829adf6265dc2345119947812a9ed3037e05167..fd0e815ec91279e2a0038b924a47a951914e12cc 100644 (file)
@@ -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(
index 6cacd68b59e3e78c247fb64aa9893167a47efaef..f8a237417be5b4e89145a65227e5cec6e409e785 100644 (file)
@@ -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) {
index 1158f677ffc2484483f5724a42535c7fd142a0ba..4ee2eac6fd81f3750b16b164f2c596b342b1810f 100644 (file)
@@ -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()));
             }
         });
index e82336c1e8200a5931b48b4b8de1cce903bf1f91..7ca7185500afe7d7c0feee563d4407f41aaa75ed 100644 (file)
@@ -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();
index 2e5235c78b293ba5d8e9f2a897138fb677e10b11..6804983ed3310fd0e7b556da044a0494ee3dac6c 100644 (file)
@@ -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++) {
index 8612e604756eccecb06612eb3ac507ac02522fe1..36c086515f71c80ecd979a9d6ad54f3755bae7cd 100644 (file)
@@ -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);
index 0ca638fa1988893ed37bee750c3647762006e9ec..e9d50a3a7e21cf48b5bfa2babd16a1cce44db505 100644 (file)
@@ -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,
index 7218c29248f142a99c4bfb8de10be9b799d49561..9eb409de45fb4f6b3ee0084e7e85c69c21da2a9c 100644 (file)
@@ -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 {
index 818eea06808d6119f10bfc15a061d2bc5cdae3e0..9fdf1e24d63905cb8c6263ebc7c91f20e09de58b 100644 (file)
@@ -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 {
index c3742e279766fb94fc72513523c630b1e33aec80..8bb73fe14b265356d71e441bff0ef9d86d1e0a57 100644 (file)
@@ -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);
index 2ee8288ed3664c670a12a711e7b13d1ab0582b5d..7bd0bf1f885d4b74dcc47ba13c37602e1625d770 100644 (file)
@@ -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();
index ef9761afb7f1811926ec539347359036bda0009d..b7c2780ed853ab253187a36e9a3d91af290d9bec 100644 (file)
@@ -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();
 
index 8c14211e18ab2186e5bb7bb3123a13029ae680dd..a5648abf190f1d1569eceaee32c7d3e21b05233a 100644 (file)
@@ -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();
index 7b47bed2c8913f493ebbb237643c527b13f05921..8cb6ab3ba8ec4f49d30ecaf353efea8a9923ae10 100644 (file)
@@ -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");
index c0316892d991fff18542bb4d708411e655150776..2a4d57c97fb614a30bf98b9f3d2027fec7f40d22 100644 (file)
@@ -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);
 
index b92b6c18a615c97325cc6f200aba0e77493e2aa9..172d930cb36efda7fe9a261fead067c4473852d9 100644 (file)
@@ -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 -");
index 84141e07854bdcb617e51861817af94d49cbffa6..17a0405690c86862e04b4a003ad53a40b4f7564b 100644 (file)
@@ -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
index e6c70dafb60ea2b8f6bc2790103608bf69306f1a..18ac8ca8becfd023d65d237571f174f3ec200976 100644 (file)
@@ -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
index b60a08cd8b070839c60fe50c1dd5cb07a8bcf19e..83f94aac8b5714817c7a243be60396e1f24f9a33 100644 (file)
@@ -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");
index e2da8be910a9c07e9e2d9f8721a0c809e1df2be6..e5c4a339922bf64f63776ca38a325cb753b419df 100644 (file)
@@ -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");
index 2a231e65341bc1e65ef93a29623ab897987b25f6..534c92d5f4daabc218142d2677e865b0e6c0ece0 100644 (file)
@@ -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) {
index 2b660b8b0b40dc07c419ce2144d150b1d9e3fbe2..30a34e4fc4538180f75695b182a04c8a298d32ea 100644 (file)
@@ -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));
index c6422891fbfcaa648b4ba5806750f2125828cd14..7a1717cdb64a8f3b98bc34116b85749281893aa0 100644 (file)
@@ -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));
 
index d8a165fa2371cbbf861a1796afd171e1f6fd56cb..155ce350593c3925234f40e7474b80376870f4f8 100644 (file)
@@ -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);
index 33d1c659f0ee49876902d9d37407ed109f85b2ca..69b331287b41069d3ab514d6ab30ca6d3dc9656c 100644 (file)
@@ -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",
index 669d6916340066a4078b5e61b0d0452163f24986..81360970400db36055860d877a6d32b900b232ed 100644 (file)
@@ -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);
         }
index 7f3b3872dc26eb25ffbc000c921d9baa352b8d7e..8d42f1a5615098a3dc2be07737c9299ba52a9ff5 100644 (file)
@@ -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);
index 1ce55d97b781cae6c71241011626242321e3d814..bdc29c64bc214223e11f3b62b1a6900f0df4a14c 100644 (file)
@@ -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("åäöÅÄÖ", "åäöÅÄÖ");
index 6e3250a8254b2e87991b21ba3f39f839403a39b5..54a23b5666516fc8a4b4b94fba10cc8cbeba87b0 100644 (file)
@@ -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("åäöÅÄÖ", "åäöÅÄÖ");
index 9bc567c0fc021c5f183f5f99bd4038f0399f1335..60e90a8f1b7a26339073d3781ae4ff4792b06e23 100644 (file)
@@ -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("åäöÅÄÖ", "åäöÅÄÖ");
index d4c48ac47e81eb66880034b571b864aec8433dba..29669e2a75f51b62cb9aa59c85e11804cdfc4e50 100644 (file)
@@ -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);
index 98e94c49ee944ee49cc3bf7fc03837ee0b266ae0..e12004b5159cc9ea80cc4507604a66028705c411 100644 (file)
@@ -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
index f7db90acd94c1d376916a584d86e3220fcb11b73..0c8d2d8dd832ecd7081ffe12a9abaf691f4a907f 100644 (file)
@@ -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() {
index bbce7b7744d877d4267b8dc801e2f1579129a565..c51e24ceff6cb11df5b69c73a6c80371d2e8c576 100644 (file)
@@ -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);
index 0fe39fb6b19f8631e5c8301e8ad145fecebcc078..f81ed25db9cc4c239d271fada1f8fad46d25da80 100644 (file)
@@ -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);
index f999d633cc3bf0bba4f72fecec69b41c2c0ea412..a0043b66495caa3280a4886e16cb47701056c69e 100644 (file)
@@ -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"));
index 9c446befd9758eec226f913efd37215a0d85ba4b..e719b4f13ea707fc6a1c76ae5146b9e1ffb735b2 100644 (file)
@@ -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);
         }
index ada6622c98937bc0b9b737fbf18a9f27a420af48..99c84793fc4937c339daa134aa05858e2079c21b 100644 (file)
@@ -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);
index 40e566194adf5f9a1779d7c3bb47c40ba4de21f0..90dba78ec04b83e2183cfe1eeb0710d1f1e55bde 100644 (file)
@@ -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));
 
index ea8893b2304273b7b702ad26e446995263e7f0b6..48f168803bf954baa58155f89a599342b4dc92f7 100644 (file)
@@ -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);
index 6339615104ffc353f4ac3e0f3e03681a717f6264..79dc0a88ef7d636a4722250b8406e7653397436d 100644 (file)
@@ -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);
index 35ad29c1d2b76b3059cd0cac20a3e60cd49a0afb..3812b62ee1457e61e91326e63ce7447b584fe4e7 100755 (executable)
@@ -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";
index e714e0dbd415a7f9f2b30e60ea8074ffbf73d00f..82b210251871e51acc64f49e6cd4602570b91fa5 100644 (file)
@@ -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) {
index 4d8f2f94fc56934bc5bd6a243b3930c61f4ffbe8..25a5e9fdb249a9370615cc87a9d548a71ed8f7fc 100755 (executable)
@@ -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";
index e32347ab43e9d0a90f3f0e9d7dfb4638c8bd244e..46ca30951892bbd646e2f9511b47d144abca28fd 100644 (file)
@@ -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");
index 9e214e2598b32c587b06a1e05d56a04f7e1077cf..06cc314cb82ea871e31434a476dc33e3ce0e9619 100644 (file)
@@ -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() {
index e83a9d054e765a10a6c3cb3cfcd87ff1239f40d3..7c0d8dc7fb15ecbac9b5f1b9c001b06580f68da7 100644 (file)
@@ -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);
index c8480d28986e17bcd59042e3e2799b7f08f664bb..b5dfbc704d14c9706b792c9804afe399861e218e 100644 (file)
@@ -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);
         }
index 178bc28da8aa5d9a96fde3a62d29c16881841e8c..376e84a1cb47fce8f17bc3c4784dc5e6f1bf0e1d 100644 (file)
@@ -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");
index f1ef5d5bcbc3f34c91956b4a12b2691d79191cac..a775092ab382fb65f3f56671c8a4d0dae239f04b 100644 (file)
@@ -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);
index 54db9f4977c0671700eec27aa65dbc4991189022..129445a2afffd354aa992e9486ed48d80bc1770d 100644 (file)
@@ -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);
index e8f3e0cfb8f1032c2484bff751a8b0cc5186bb9c..9844961570339ee36802d3f5bcf2bd2a8ad12b31 100644 (file)
@@ -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",
index 1d962edafeb696152ec04f38409d76c3b79c1dd8..b140a64cabe3679f9d93c835f437922613753824 100644 (file)
@@ -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();
index da04a1aac181b8fdf30b50c77a769d97055ecff4..34cf62c055b58c8d94a3b98f22498e5db2258498 100644 (file)
@@ -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);
index 0f64f4772b0ff2eb1d4159b2a9dafec48fc5e4ce..e00d042ef002f14f8a0fe9bcdbc5c8b918a30117 100644 (file)
@@ -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);
index e68ce97fa432a8f0e9617cb1ac6dd007671c9d0c..923e5e0c43324dd8e76b84fe3bac05ef375bf6e0 100644 (file)
@@ -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();
index ae4c83e78951aa2a7905c9fa340641f687560dc1..1b142e5f6bd607e59064d9e4f932df9f445b0df0 100644 (file)
@@ -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,
index 9bc61690f32930d8e1589c3c7d9057e9137aef9d..015a8c213aed9463acbbd71c7bd8d6fea0427713 100644 (file)
@@ -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) {
index af1e7b4e7afe86c0874e08481a41a0e165a40360..35a7f4d446922e3d4633280b1fd66a66fb165646 100644 (file)
@@ -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
index c6cba16f91c3856ea8cde7f99d9f535c1940c80d..8673a36ed68192bbb229cb284096d1b672ac221e 100644 (file)
@@ -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));
         }
index 98b8c0151f3f35020830ac3dddbdfa13bb51f2d5..eff78372998f86f50327bff4d5260bff67b4f58e 100644 (file)
@@ -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);
 
                         }
index 58ec0f765d17fb920f13057c5d44f076fa57dc67..f28b27a85847cda9d5b4cbf171ca31e5c0b770f0 100644 (file)
@@ -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() {
index bd99a2d5dd2baf9a8a332d33d7ef382021211f35..83958176fa965778c1ace48279980d90abff4adc 100644 (file)
@@ -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");
index 783889c2242b36c7107a5c1f51172e88a7a02c0d..0fd201fc9afd9bc90db61d90909e2c35368cb44b 100644 (file)
@@ -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"),
index 85eafb9333a0f38579861afab7d1e2474c319b1a..dda9e345944da5182f7dcb4edbb56fdb57342dcf 100644 (file)
@@ -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);
index 525e2f2ecf9464e2dd2368059afa9c3c1bfa7757..44a489d20cae258f1246d8f932a4291fc96c80cf 100644 (file)
@@ -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();
 
index d5c4a2ca4f1e38d81d3adab285220b2037dff81c..6678674dc69cd1febd18e0a86c3fa8a55e4c7ec5 100644 (file)
@@ -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"));
index de5e4fef29467d806b72a95c2d92621668b2a74e..3d0d04bd40d7bde8b7f474368c0751eda5b62753 100644 (file)
@@ -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);
index dc824c60ec408fa98ef04cf77bd8cfacd44cefac..c623c00a4a16b0a6cd0f21fecf082f1d3f15a455 100644 (file)
@@ -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));
index 4c3a5997046d778e6e7f247ec4e2b17e23219e64..d148dbb56961970c4d61496777ea173e58bb8be2 100644 (file)
@@ -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);
index 0439d15fe2fb6504aa1e82175657b72cdaeb8bf1..93bd94b774a135cb5218092d6830233e2baba69a 100644 (file)
@@ -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));
         }
index a1177b7db335046decff828cfb5e9940cca0f64f..87a1d5c29646769ca06e6c809788f9ad9b09a50f 100644 (file)
@@ -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();
index d173c7f5c780af5f93ee0d482519b122ffec9ffe..f9f0069e5c27970be967e723a14462f6787df17b 100644 (file)
@@ -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);
index 995ab7e211011a36a715167e1e35d859002776d1..fd8c704f4c564b95db30b10b08378315f4123200 100644 (file)
@@ -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++) {
index 31e8c262fb90c5fc6e56deafcc9936c6ecb0ec3e..8f448014371b84a6d5aa0d7f7e3b4675fe01b022 100644 (file)
@@ -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();
index a319cbe7eaeb601d12b7b4ee856022eab39eb2bd..e6256086313a4cb68a9523352440460f53bb341c 100644 (file)
@@ -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++) {
index 59f5d3e49abf3049c7661e452a7e8e26179fa464..46853b9cb4fc979983a0bb71dc52f49ebd02ee34 100644 (file)
@@ -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
index 6439dfa64b3f4b35a3e8d73970dc2906542c630a..608c706d6618bbb5d739a4fdde2d6b68d1b0f012 100644 (file)
@@ -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);
index 8607dfe42e069f9a90a61e9979eea21e78a2247b..c58edc38a84c64ac9eee365bb2eca535d72de12e 100644 (file)
@@ -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();
index 2b37c4358e139c855b2850c95bc92eaac4f843c5..45890ced73751045bbbcbfec981e07cb4e4eeb05 100644 (file)
@@ -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();
index 0f08b19318769887ad61b7469139619cc34c2f40..e17ec00227432b76924b05a9efff152f367ceea9 100644 (file)
@@ -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);
 
index 7f1792474ea70b02382fcd8f11d8385bc4ff67d2..09f1e7b55c65f672e225b81d763d649f59570aa7 100644 (file)
@@ -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
index c106b5bde288165de1c5345ff1550d9a0917d2bd..ece3693bfd5217c22f360ae1d2c57032ed9484ad 100644 (file)
@@ -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);
index 352bf86423cdbcecbedcaafc53e4b136794be982..5de8cd1a192335e381bc61d1ce467eae4e842af7 100644 (file)
@@ -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();
index a9920c2eada4bd314828fbd48e527a635e76323d..9c5f83e323b7529cf68c80a7c40a16eeca1909e5 100644 (file)
@@ -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);
     }
index 15d5a1694a83d4a54487d61dd6f8427841f0c85a..79239da7e78ce33ce89b45acbee1a43409ffcab1 100644 (file)
@@ -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);
 
index dbe64a53557600561f1bfe4f262af4c8bf5f35ac..9694ce66d9bc0bb8defdeee941769af442ae87d5 100644 (file)
@@ -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);
index c47d258d6f09cc497ef172a6cadce8a283a3f81b..8a6fb535c59b7d2b665739a35e1a0b1fea794791 100644 (file)
@@ -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++) {
index 137d91bb64e0a7a3a5679ad43387fbe50a069b70..95f215b66bda42c3b93bdacc1180b205a48f70d2 100644 (file)
@@ -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
index da41209a5005d6697edde42db7363869cf82bb88..3824c6c5d026f40a1a78f56143b93014e255bc37 100644 (file)
@@ -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);
index 6b15367d6b424bbf8b1145c4af045fdf5dd09fcc..3e99374ae054b0fcf2c447eae0ca269befc48c0f 100644 (file)
@@ -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);
index f5f7cc866c23c3bdb183cf72b432cb03eb751f89..e8903ed92faa0413568bc6a873ffa01b1dcbeb58 100644 (file)
@@ -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);
index fd16225636b60dbc51e5e8fa4fc0e214e6a86c5c..230825d808e7ccf55e4a82d68485bbb769683878 100644 (file)
@@ -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);
index 1632e1e613093483a753130c9e7e21170357faed..dcb1dcf5770676e0de055a50de17cfb9c8c14dae 100644 (file)
@@ -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
index 25bf40edde301fae7ebbd3c2bfc0b6716ff02b1a..c10da456b55755f16c9615ae6b9d716581c87d25 100644 (file)
@@ -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
index ef2ed2ffda293b18842df4cc366ea4774c804fb4..19a2148001ef85912db61690d061baabcc04eec9 100644 (file)
@@ -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;
 
index b6ac6e2f97f97cd40f7f4a9d7bc2bb8455e9be4f..9280faf60024dce87f483ba2bbf7833ffb645365 100644 (file)
@@ -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));
index ab8011010c7e6a0c27fe5b49958be35ce267c0a6..7441544a13cc5b083bfce8ea76a98f1ee4b29d97 100644 (file)
@@ -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) {
index 9ca0cb9c38bc5dc838103e935553edb6c0cfca3d..cac26c229748afc7af3496e95eb12873a93e1ddd 100644 (file)
@@ -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;
index 516ca2d7c93e9577252ed38ca3a31ef822402b36..c117f179f785064651b65cc7a154db0eebe61452 100644 (file)
@@ -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>() {
 
index 857d84f261ef6dd50a36d0fde845d4bad2408c4e..d7aaab37ca2c703b8dd584e4481f6dc6603ac4ce 100644 (file)
@@ -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");
index 6d9ced5d11a3abd0510f60d6486d7d8baae513cf..f4dae2aa752e0fb4414d1affdca163e7ae1c5632 100644 (file)
@@ -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
index 47523067c96062bb017aa511b03fa0e4bc6fcca3..dca7074f2e16f1a0216de1c6cd30defbb9afade1 100644 (file)
@@ -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());
         }
index 300809e420ba55e06aaa7c9a0b1a5c8967c7f124..3eca52b4688b1860ba5b7306de8784573bad58cd 100644 (file)
@@ -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() {
index 5d1a2540b8e87a977d5ff444e233e65f343452ce..965dd470eb84cd56d85a8e473df130dd8b75eb7b 100644 (file)
@@ -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) {
index 1a5a7ff9f6f057cac83e02edd87ee90e5bacdb8b..a423fbef0eac9b1b260c17b97530cc4f366d306b 100644 (file)
@@ -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);
index 0edd76e5a1fb0765e1232bef271752b9cba9378c..3946ec12bea26f21929e5301454b05111ca529e9 100644 (file)
@@ -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");
 
index c8b3604fd65d97a7b17b2a819a446d159cddd4b6..13d43f83496d0b0ccaf57cc4c381054d5e497ada 100644 (file)
@@ -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);
         }
     }
index ea688c7380ca8603b99f539ff87d22ee3c77f273..73e709d79db788bf05813557e396128a6d6610f6 100644 (file)
@@ -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());
             }
         };
 
index 69c9e3cfe98d2401e73b7be5b216cb741b78a89e..86f47ac505da3108144011ec11eb696d0f7ba71a 100644 (file)
@@ -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();
index 0c0a631c46d5ca8b1e0144bd72bced9304c43c0a..100ebc3dc1f80246fc35a1d1ffe5f118ef5316ea 100644 (file)
@@ -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")
index 1d885418415d8be9918781b4279783ce437a8adc..eec30f5b40a3ac60bbe7843d8170d537befc6748 100644 (file)
@@ -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);
 
index 670da355ef4004f9178c6e3710d1ccc1bb58d885..ede0a23c7fda65233e2e55a5e939a18f15a97e55 100644 (file)
@@ -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() {
index ff3ab1767b19df3de54e053f3a6e812b583189f3..39994eb9707e2db07e229c2ea96070107aa66024 100644 (file)
@@ -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);
index 5c580b5f3d25542fe3de2ebf9c5c06ca024df837..1c1e2efcef50526604899bca3ac377a6900502e6 100644 (file)
@@ -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")
index 90ac03a67acad18cde8310fb9307eed404e97e42..c2aeb51bab3a1ca9eabd047764777c9e62934058 100644 (file)
@@ -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);
 
index a45e346947b01021c31a34a425ce0814e02bd4a5..39a8d8915305920568b91441e537618f310570a0 100644 (file)
@@ -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")
index 15c205bbdaa798129930b1a6384ecceb8ef58779..a4f236bd256fdd5c742cbde88737ae21c942ba48 100644 (file)
@@ -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(
index 2e3a855202359680d0b1b23ee57189b381366972..dd8b78510c840f5bcc783cf2687a9549af3fcacd 100644 (file)
@@ -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))));
     }
index d8637fe27fd1da65d1d555830a7ad690b9694e0a..fb57932caad683d1a2579d48655b2c9bf10e99d1 100644 (file)
@@ -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);
index 44b2c72cc236d094963a3138e939c1cb2d08b21a..ec715a30bb6b657355354324958eefc5dac0e161 100644 (file)
@@ -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);
 
index 76df6a99ba5d26c24fc8cd39a95caa680c23db13..0ec27edf5ab02897a080938efb04834e4813940d 100644 (file)
@@ -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");
index 20782e8d7ef2f8985fc9236db5f239ce652daec9..c0ffcca0df81afdaa3ed61e7c515297a5bd78cdf 100644 (file)
@@ -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();
 
index 63b5aaba5f330fc9cc88ac2dcb7eb8d9cf2f8e79..60519cf1c01ea9c319968e99752f9fc93856a893 100644 (file)
@@ -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
index 87bed151d4a0dfa395fe181a0baef510a487b749..fb182cc89a572faf5f80498053cbce3fead4f50f 100644 (file)
@@ -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);
index 0c0670c54d6de05bc0501ffb3b4bb950334a52d7..4d1f0213c41dbf9b92f46ea8c87bac0f4929ff4e 100644 (file)
@@ -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;
 
index e9214d23561200b5eb2a95dfd438dcdc7e012676..925edc1aaf2b5b88be8d0b8531a3e57092d8d798 100644 (file)
@@ -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);
index 1d7943d1d1775df7c835f47f3df1e85a7ce9a50f..f81f5a8ba3acbb443279b02da6c5d836d34739a6 100644 (file)
@@ -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));
index 07ffab84a06a16246a39aca889683ddecde4c815..00da200d3923131561c9db69c8dab9818c6865b0 100644 (file)
@@ -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
index bf2aecc1024ee4732e55068c2b28d32c84b84bc0..7de1b8515d00ebc5c7c52cfc60b03dc34dfd6ba9 100644 (file)
@@ -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);
index cbda57bbc080d112f9fa18e1ffbea5bfecde6f3a..2717034a4340e8a38d28794145b1e9b8c647bcbb 100644 (file)
@@ -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");
index 06932cbb9c4eeca5c8162b9e5e511161f3e3e645..7affc2d2f2a8828c57d005dcbc3dfde677534e44 100644 (file)
@@ -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"));
index 8d1f4a1f9f5409e7378755c0a466a7cf2ec06ae4..af5aefbe22907e0a8fe98ca94a05307ffd91358d 100644 (file)
@@ -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) {
index 5b0e42740f3b38b34d986b869047b4c14f34cff1..64008cf093ea48dec583087ee418470405664660 100644 (file)
@@ -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");
 
index 5b242478079b94b3e50243ab488fe959b9fab611..bb7e14c3dc77f84f299018b3f3f5f1fe015a465d 100644 (file)
@@ -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])));
index 54cb65db054f40e08799788dbc1d4556ec71f24b..b1c16e040bcdc8e7febc5462fe4b71e106fdcd33 100644 (file)
@@ -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<>();
 }
index 2c19ac03d7de6aa34387f21ca8d89125e069299b..b4091e8930f006e6a71a570517614915d5ddb1ba 100644 (file)
@@ -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() {
index 73fec4026c2a7a7b287830a1ae7922e4ad52dcff..ea95e50e41a1680f0e71909b08647e485c8bd46f 100644 (file)
@@ -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) {
index 5abeedcea6b338df74f68d7d1f9b32ef87e01fcc..f5549e0eb6fbd4a356652adde119b486266f2eea 100644 (file)
@@ -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;
index ff2f39959b4b3a32c4e194f133a5e687c114fa65..eb43486eb64bc202e3a5975df97d0d62ad87c105 100644 (file)
@@ -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) {
index e07abaa9f62df616041944ccf7b1efb3bc548f57..4537cf521249947d2e5618cbf91b633c2d9a5136 100644 (file)
@@ -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 + ", "
index 2981001530ad885882bc6a14167bd941279306c0..c80d2818a943d5ed070b5fdb1c589264eeff7ef1 100644 (file)
@@ -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");
index cae1dbc29b34354058c0d4d167bae57159247fb6..784c82304cdf22ba1bfe4cd524abdb0ea7975d5b 100644 (file)
@@ -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);
index 683e1a8cc09497ccae2d1bfcb602d5cc880080c0..df34961973d2f902f6a707770c9754d0f6474ebe 100644 (file)
@@ -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.");
index db58dd1feb6c776bf6496da92c1cd9525e924f66..ba71072c437766d64f7895fae8c491ff4c8f5324 100644 (file)
@@ -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);
index db4e36e49a544f53dd07c5d11e94d26a9042177e..1a84fd87184071d76278a93596f59c9dd1e8d8c4 100644 (file)
@@ -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) {
index 7707fe0b771a2d93f90ff0a41e4de17409c4c30b..75734e53917d0a30a547c50d1f7c8b9f2b005ee8 100644 (file)
@@ -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) {
index 54e266fa405ad314a503bab511c3591e4a28a2e8..5c1391e9328bd7a8bb33777b3c662dbd05e2cd31 100644 (file)
@@ -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;
 
index 44d4def416347a5b6315eb9e64d09ee4ac223d29..ba860eb84313292f4a53abe11c8c9355abcf29ef 100644 (file)
@@ -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() {
     }
index 5f7d7680fd83857598b60552a3ee5816aac6c8d7..115250240e2670afaf7a8bba204c19538bff8482 100644 (file)
@@ -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() {
     }
index b9f6d66b3ede2baf43e39435308771181c60881c..750e0a422383175fe167cb67e1b93475cf53d237 100644 (file)
@@ -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;
index c5de9a3e4668807a0c1a58e57e836e503499538d..1042eb630a4720609267bb10ef4117971c69247e 100644 (file)
@@ -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() {
     }
index 5f8472391c38052f5a259bfa6ed06cacf6382e79..59342e34e87d9b9aa25f8aed9f38e1457dd86d65 100644 (file)
@@ -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
index 745af93b113dae117224fbd9a69e983c1490eb02..838ec9b23832eafa5584d6d52ca53f4d577414b9 100644 (file)
@@ -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),
index ac9ed4f7b59e181fc74f60437f5e69c4aef2d8ee..7b10fba57979f0dc7b52ba2732fbd1dfed04f616 100644 (file)
@@ -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) {
index a4a5ed0ee12abedf3f75c45c8c4cc5963e0f6d02..99a9ae2c8f817722f638b8e0fc95fd9a51cc3b96 100644 (file)
@@ -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++);
             }
index 96e988b8eaad82cc16368ac8d36a8d7627fd130e..9014ed68b3bb1f9c4df434173612670963cab910 100644 (file)
@@ -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
index ba598b68973c65f9ea47cc27cccf80476cb27ee4..0fe861f7235edddab1e07e1540da39dc42dca082 100644 (file)
@@ -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;
index b7d6e03596522a1f870e68f90acca56c5bd7d3ab..904ecbf1d5ba7b7ea1b752328f478cdb13c5aef5 100644 (file)
@@ -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
index c70359c1c47a2fad53c442f431c0df465209f208..9281002ae9ea24b4ed77cd02e0e214987cf75769 100644 (file)
@@ -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,
index 8752fd076810ee4f3d9e7b718e59d5eee8cf228c..139835b31a631dd876f30c3bc78d4c745e685e22 100644 (file)
@@ -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");
index c90551dbf2b5f2264f370fc770decd907fe76ab3..a354580645a697985f252fd787de8bb5fb2b534d 100644 (file)
@@ -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> {
 
index dbeec1b0a72bcbbbf9ecca964ce07a499d56bb92..2e61b293ad58139536ff2a4d2ca9398b0c7d25bb 100644 (file)
@@ -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) {
index 7813b3312c7f238e1c1a2f6d034816bd08bcf0b0..d8a49d8c35de9cc544b567caa38c9a54ec070290 100644 (file)
@@ -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
index 9cd0a26ed65ae7129b9504f6c0b663c3667fc38e..b5b1e688eb96020cc5418e639cf6f560b6f682ea 100644 (file)
@@ -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
index 01b00b04ccbe5fccd80f7cc59c69cf28aef1450c..368d85e9deb7e2c159b8ba462f619828be79ddf9 100644 (file)
@@ -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<>();
         }
 
         /**
index 2dcb5d5b3f09d65eaa68669782961270b062b9be..c03c375810e9d2b7e403602f412f0825686b9e14 100644 (file)
@@ -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();
index a654406f1e331201e4e97cf5c910af25b489224a..dd144bdc58e45545a0ab922d6b461d506bcbc87b 100644 (file)
@@ -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
index 7c0191d7c5789f732efe0b8a5e8fe08c85c50130..e50effb6a44627f2abb14f9d1828316fc28c84f2 100644 (file)
@@ -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;
index 98c204de461facab0f6ecdab66cb8e2171806dd6..7df5fbd5d127734cee38f3dbdf1d4ae28600c9bc 100644 (file)
@@ -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));
         }
index c455932ceb7ead365bf27dd3c8e4c970cfd205da..fc7dd7e79155dea37b68f9059d130828b4e16c6e 100644 (file)
@@ -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();
index 888313e3b797f392c24d44f709ed30702a9e06d7..5568f6b97c570e40b865953f0b8f848f0484e371 100644 (file)
@@ -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));
index 12772576865cdab43a5cc2cfb3c090dd99db5a06..b67164c1c4a85955e8e080297bc3892d6f26eaa0 100644 (file)
@@ -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;
 
index b91324bf0c7dfdd2fdfc16a98a2f598f54cba8c9..13f52537e25bf5502fb2f3eb44862435ed784b26 100644 (file)
@@ -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
index 07a71f53e070ee65e12d1327a00175ea4eba8380..d31bca5901a42bb6e7f27298011c6fd07a1ed24b 100644 (file)
@@ -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"));
index bf17dc553ebcb058bf3ba0797b74c2c9aaed52fd..87adb11bb4f10c732b38bfd9180fe9f8a81a0f17 100644 (file)
@@ -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")) {
index c37ffa86a49fd45a1205bd146c48c577b1c57278..9c9b49e3da9b3f5332be1244ea94fc9a0bedf881 100644 (file)
@@ -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);
index 5c0df81c9c621b3fb596851988388f50121c6bbd..cf31a5f3dda9d2a77be901dc2878978738fa1ec2 100644 (file)
@@ -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());
                     }
index 1e2fd09f2e6ab19587bf8d3234073d53692809ee..a534074da01cd527d567f626519b80e8b20abe23 100644 (file)
@@ -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);
index 604eb707eee1d659de9379e01827c1e2ef2a5147..5e27b591b470b53440f61d789d300c0869c64a12 100644 (file)
@@ -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 -");
index 6de1d16d415cc82c116d7e03d39cbc863952148d..d2cc9450f2514124cfb1cd86de0ca39da9058170 100644 (file)
@@ -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",
index 060a6a2a7d7e560a4a282342b79dd718b9d95d96..137216d7181328539ae29bb35f73a93aac3a22b6 100644 (file)
@@ -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());
         }
index ca87aaa3799e5bc37dbc1e118026b53896c6638f..d804f8f8ce1acdfb5e89ea40781b80d3ac1f85aa 100644 (file)
@@ -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);
index cc27555638b37d2ee071f94b8d552f53195721a7..b48f252d2741773f145d599804ddb5dc46cd69fb 100644 (file)
@@ -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(
index 6bd456c7e2ad9c20e4286f2af86e178c6562f859..a642a1207ae86fbcd0ca4e539f9b172e974d5afe 100644 (file)
@@ -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());
index 33841a13ea660dbc246ac38f039ee9e87f770711..b17febee04eaa127b9c10e759c22655350cbf876 100644 (file)
@@ -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");
index e7cb461b1c65c3d7a0eca895ea084f157d0262cc..d135c79347884e37682502845d291036c02edd22 100644 (file)
@@ -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()
index bb29a82d2dbd887f39ebfaff465c8dd9d417c79a..391618bf43aad51d2b79904f8bff2ff0639d4a6d 100644 (file)
@@ -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")) {
index 44ec4ca12934c63b229e24a5337413871608701b..9de53a3c28cfdb1cf81fe657b9877cdaffd210a9 100644 (file)
@@ -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")
index 5b218e3f98d4fa142ed0a7f0b001cae02bf9a994..261af495fa69cb1166affda04bf37fd10ef9dcac 100644 (file)
@@ -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()]));
     }
index 1ceed606cd7d9d48f65e385ccfac502cbdaf7c0a..7d798fa2e8227291c16bb0f94e15f00bb291444c 100644 (file)
@@ -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()]));
     }
index bf0387d468b9e8720fc35a5d3fd86c20ba5cd3ec..9698068621680d85505d4f09ab7a97ecf878da86 100644 (file)
@@ -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");
index c2b5c3f1cbdfe3c3064b0d11b2d6d4c1e35566f3..de8e4ea9c4984e7e6b795a7040d598bd487eb061 100644 (file)
@@ -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 };
 
index 776cbfb57d5f71493cea9000fac33245cb8264c2..15c8498676998a72a26f08ae37d5b523766a9527 100644 (file)
@@ -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";
index 7a0c80f11afa8ea302b5ef58572da688276811b5..5787c2faccd5ad36968d29e9dd531c3404cbee4a 100644 (file)
@@ -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));
         }
index 5413e7a0b1070686051f6089fb6f939dfc2d9325..a0ca71482426652598791202d761020d0b718782 100644 (file)
@@ -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());
         }