From 94409e2221f14d2b592cfd41b17b000aed091600 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Tue, 21 Nov 2017 09:57:39 +0100 Subject: [PATCH] Remove unused imports (#10330) --- .../main/java/com/vaadin/client/ui/FocusUtil.java | 6 ++---- .../client/VBrowserDetailsUserAgentParserTest.java | 1 - .../v7/data/util/AbstractContainerTestBase.java | 2 -- .../com/vaadin/v7/data/util/BeanContainerTest.java | 1 - .../util/GeneratedPropertyContainerBasicTest.java | 1 - .../vaadin/v7/data/util/IndexedContainerTest.java | 1 - .../component/calendar/CalendarBasicsTest.java | 1 - .../server/component/grid/GridSelectionTest.java | 1 - .../declarative/GridHeaderFooterDeclarativeTest.java | 1 - .../declarative/GridInlineDataDeclarativeTest.java | 1 - .../server/component/table/TableDeclarativeTest.java | 1 - .../component/textarea/TextAreaDeclarativeTest.java | 1 - .../v7/tests/server/component/tree/TreeTest.java | 1 - .../server/communication/FileUploadHandler.java | 2 +- server/src/main/java/com/vaadin/ui/TreeGrid.java | 1 - .../java/com/vaadin/tests/components/TreeTest.java | 12 ++++++------ .../AbstractListingDeclarativeTest.java | 1 - .../AbstractMultiSelectDeclarativeTest.java | 1 - .../AbstractSingleSelectDeclarativeTest.java | 1 - .../component/button/ButtonDeclarativeTest.java | 1 - .../server/component/label/LabelDeclarativeTest.java | 1 - .../component/textarea/TextAreaDeclarativeTest.java | 1 - .../component/treegrid/TreeGridDeclarativeTest.java | 2 -- .../abstractfield/IntegerFieldWithoutDataSource.java | 1 - .../tests/components/table/AsyncPushUpdates.java | 1 - .../src/main/java/com/vaadin/tests/dd/DDTest6.java | 2 -- .../tests/vaadincontext/BootstrapModifyUI.java | 1 - .../tests/components/grid/GridAriaRowcountTest.java | 3 --- .../radiobuttongroup/RadioButtonGroupTest.java | 1 - 29 files changed, 9 insertions(+), 42 deletions(-) diff --git a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java index 9a0a4ecea4..6fbbc5d9df 100644 --- a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java +++ b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java @@ -102,16 +102,14 @@ public class FocusUtil { return focusableChildren; }-*/; - public static void focusOnFirstFocusableElement(Element parent) - { + public static void focusOnFirstFocusableElement(Element parent) { Element[] focusableChildren = getFocusableChildren(parent); if (focusableChildren.length > 0) { focusableChildren[0].focus(); } } - public static void focusOnLastFocusableElement(Element parent) - { + public static void focusOnLastFocusableElement(Element parent) { Element[] focusableChildren = getFocusableChildren(parent); if (focusableChildren.length > 0) { focusableChildren[focusableChildren.length - 1].focus(); diff --git a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java index 79d278acd1..a1695bbde6 100644 --- a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java +++ b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java @@ -4,7 +4,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import org.junit.Assert; import org.junit.Test; import com.vaadin.shared.VBrowserDetails; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractContainerTestBase.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractContainerTestBase.java index bfbf6d4eb2..95f8d6ebd7 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractContainerTestBase.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractContainerTestBase.java @@ -10,8 +10,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.junit.Assert; - import com.vaadin.v7.data.Container; import com.vaadin.v7.data.Container.Filterable; import com.vaadin.v7.data.Container.ItemSetChangeEvent; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanContainerTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanContainerTest.java index a7cf440279..32f3998cbf 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanContainerTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/BeanContainerTest.java @@ -13,7 +13,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerBasicTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerBasicTest.java index dfa537a98a..75cafb07be 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerBasicTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerBasicTest.java @@ -9,7 +9,6 @@ import java.util.List; import org.easymock.Capture; import org.easymock.EasyMock; -import org.junit.Assert; import org.junit.Test; import com.vaadin.v7.data.Container; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/IndexedContainerTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/IndexedContainerTest.java index 79adeb8218..1a0f9a546e 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/IndexedContainerTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/IndexedContainerTest.java @@ -8,7 +8,6 @@ import java.util.List; import org.easymock.Capture; import org.easymock.EasyMock; -import org.junit.Assert; import org.junit.Test; import com.vaadin.v7.data.Container.Indexed.ItemAddEvent; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java index 38ee0928a0..a9d3f14248 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java @@ -24,7 +24,6 @@ import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; -import org.junit.Assert; import org.junit.Test; import com.vaadin.v7.ui.Calendar; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java index e02d7c5286..bac686e138 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java @@ -21,7 +21,6 @@ import static org.junit.Assert.assertTrue; import java.util.Collection; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java index 87159d0024..3f180f2b0c 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java @@ -17,7 +17,6 @@ package com.vaadin.v7.tests.server.component.grid.declarative; import org.jsoup.nodes.Element; import org.jsoup.parser.Tag; -import org.junit.Assert; import org.junit.Test; import com.vaadin.shared.ui.ContentMode; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java index d5ac086d46..1cbc646360 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java @@ -15,7 +15,6 @@ */ package com.vaadin.v7.tests.server.component.grid.declarative; -import org.junit.Assert; import org.junit.Test; import com.vaadin.v7.data.Container; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TableDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TableDeclarativeTest.java index 28424b86d0..e21535d903 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TableDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TableDeclarativeTest.java @@ -15,7 +15,6 @@ */ package com.vaadin.v7.tests.server.component.table; -import org.junit.Assert; import org.junit.Test; import com.vaadin.server.ExternalResource; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textarea/TextAreaDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textarea/TextAreaDeclarativeTest.java index fac607f833..a1ec41bca7 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textarea/TextAreaDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textarea/TextAreaDeclarativeTest.java @@ -19,7 +19,6 @@ import java.io.IOException; import org.jsoup.nodes.Element; import org.jsoup.parser.Tag; -import org.junit.Assert; import org.junit.Test; import com.vaadin.tests.design.DeclarativeTestBase; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/tree/TreeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/tree/TreeTest.java index 94f6847a0f..eac600e270 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/tree/TreeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/tree/TreeTest.java @@ -8,7 +8,6 @@ import static org.junit.Assert.assertTrue; import java.lang.reflect.Field; import java.util.HashSet; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java b/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java index 0038d0ca11..3216e92916 100644 --- a/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java +++ b/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java @@ -430,7 +430,7 @@ public class FileUploadHandler implements RequestHandler { try { return Long.parseLong(request.getHeader("Content-Length")); } catch (NumberFormatException e) { - return -1l; + return -1; } } diff --git a/server/src/main/java/com/vaadin/ui/TreeGrid.java b/server/src/main/java/com/vaadin/ui/TreeGrid.java index 2ff026a758..ba570a2160 100644 --- a/server/src/main/java/com/vaadin/ui/TreeGrid.java +++ b/server/src/main/java/com/vaadin/ui/TreeGrid.java @@ -27,7 +27,6 @@ import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; -import com.vaadin.data.BeanPropertySet; import com.vaadin.data.HasHierarchicalDataProvider; import com.vaadin.data.HasValue; import com.vaadin.data.PropertyDefinition; diff --git a/server/src/test/java/com/vaadin/tests/components/TreeTest.java b/server/src/test/java/com/vaadin/tests/components/TreeTest.java index 10094dc8f0..d48109e669 100644 --- a/server/src/test/java/com/vaadin/tests/components/TreeTest.java +++ b/server/src/test/java/com/vaadin/tests/components/TreeTest.java @@ -1,5 +1,11 @@ package com.vaadin.tests.components; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + import com.vaadin.data.TreeData; import com.vaadin.data.provider.TreeDataProvider; import com.vaadin.event.CollapseEvent; @@ -8,12 +14,6 @@ import com.vaadin.event.ExpandEvent; import com.vaadin.event.ExpandEvent.ExpandListener; import com.vaadin.server.ThemeResource; import com.vaadin.ui.Tree; -import org.junit.Assert; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; public class TreeTest { diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractlisting/AbstractListingDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractlisting/AbstractListingDeclarativeTest.java index 05e31fc0c1..63f639e313 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractlisting/AbstractListingDeclarativeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractlisting/AbstractListingDeclarativeTest.java @@ -22,7 +22,6 @@ import java.util.Arrays; import java.util.List; import java.util.function.Consumer; -import org.junit.Assert; import org.junit.Test; import com.vaadin.data.provider.Query; diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractmultiselect/AbstractMultiSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractmultiselect/AbstractMultiSelectDeclarativeTest.java index 35f7647049..2f84974bd9 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractmultiselect/AbstractMultiSelectDeclarativeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractmultiselect/AbstractMultiSelectDeclarativeTest.java @@ -20,7 +20,6 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; -import org.junit.Assert; import org.junit.Test; import com.vaadin.tests.design.DeclarativeTestBaseBase; diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractsingleselect/AbstractSingleSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractsingleselect/AbstractSingleSelectDeclarativeTest.java index 9dcbb31246..437c6cb566 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractsingleselect/AbstractSingleSelectDeclarativeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractsingleselect/AbstractSingleSelectDeclarativeTest.java @@ -20,7 +20,6 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.List; -import org.junit.Assert; import org.junit.Test; import com.vaadin.tests.design.DeclarativeTestBaseBase; diff --git a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java index 408a7ca3b1..02755358b3 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java @@ -17,7 +17,6 @@ package com.vaadin.tests.server.component.button; import org.jsoup.nodes.Element; import org.jsoup.parser.Tag; -import org.junit.Assert; import org.junit.Test; import com.vaadin.event.ShortcutAction.KeyCode; diff --git a/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java index d6eeb13d84..73fd168b48 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java @@ -17,7 +17,6 @@ package com.vaadin.tests.server.component.label; import org.jsoup.nodes.Element; import org.jsoup.parser.Tag; -import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java index 2c830279e9..99d46b2730 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java @@ -19,7 +19,6 @@ import java.io.IOException; import org.jsoup.nodes.Element; import org.jsoup.parser.Tag; -import org.junit.Assert; import org.junit.Test; import com.vaadin.tests.server.component.abstracttextfield.AbstractTextFieldDeclarativeTest; diff --git a/server/src/test/java/com/vaadin/tests/server/component/treegrid/TreeGridDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/treegrid/TreeGridDeclarativeTest.java index fc4c2ec0ea..c116c08146 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/treegrid/TreeGridDeclarativeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/treegrid/TreeGridDeclarativeTest.java @@ -2,8 +2,6 @@ package com.vaadin.tests.server.component.treegrid; import java.lang.reflect.InvocationTargetException; -import org.junit.Assert; - import com.vaadin.data.TreeData; import com.vaadin.data.provider.HierarchicalQuery; import com.vaadin.data.provider.TreeDataProvider; diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerFieldWithoutDataSource.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerFieldWithoutDataSource.java index 73a14b2e55..31dc2d0ce3 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerFieldWithoutDataSource.java +++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/IntegerFieldWithoutDataSource.java @@ -2,7 +2,6 @@ package com.vaadin.tests.components.abstractfield; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Log; -import com.vaadin.v7.data.Property.ValueChangeListener; import com.vaadin.v7.ui.TextField; public class IntegerFieldWithoutDataSource extends TestBase { diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java b/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java index 8eef651713..f000be2c8d 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java @@ -19,7 +19,6 @@ import com.vaadin.annotations.Push; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractReindeerTestUI; import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.v7.data.util.IndexedContainer; import com.vaadin.v7.ui.Table; diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java index 76f547ed1d..dd4f840b2e 100644 --- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java +++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java @@ -40,8 +40,6 @@ import com.vaadin.ui.Html5File; import com.vaadin.ui.Label; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; -import com.vaadin.v7.data.Property; -import com.vaadin.v7.data.Property.ValueChangeEvent; import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.ContainerHierarchicalWrapper; import com.vaadin.v7.event.DataBoundTransferable; diff --git a/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java b/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java index b5db41c761..7584085425 100644 --- a/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java +++ b/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java @@ -26,7 +26,6 @@ import com.vaadin.server.BootstrapResponse; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractReindeerTestUI; import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.UI; public class BootstrapModifyUI extends AbstractReindeerTestUI { diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java index db15fa33c8..8000604e4c 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java @@ -23,9 +23,6 @@ import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.GridElement; import com.vaadin.tests.tb3.SingleBrowserTest; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - /** * @author Vaadin Ltd */ diff --git a/uitest/src/test/java/com/vaadin/tests/components/radiobuttongroup/RadioButtonGroupTest.java b/uitest/src/test/java/com/vaadin/tests/components/radiobuttongroup/RadioButtonGroupTest.java index 81fd4904fd..bb1681d5f9 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/radiobuttongroup/RadioButtonGroupTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/radiobuttongroup/RadioButtonGroupTest.java @@ -20,7 +20,6 @@ import static org.junit.Assert.assertTrue; import java.util.List; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.WebElement; -- 2.39.5