aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test/java
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2016-12-20 17:50:32 +0200
committerIlia Motornyi <elmot@vaadin.com>2016-12-20 17:50:32 +0200
commit95d016c08569f74a2c76eac40c4f5656bb773951 (patch)
tree340977988748756ee4ace27860dc00b3358519ae /server/src/test/java
parent1407b8ddaea9a8aace0973864ad9ce093e20a566 (diff)
downloadvaadin-framework-95d016c08569f74a2c76eac40c4f5656bb773951.tar.gz
vaadin-framework-95d016c08569f74a2c76eac40c4f5656bb773951.zip
Global java code cleanup using Eclipse Neon.1
Diffstat (limited to 'server/src/test/java')
-rw-r--r--server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java2
-rw-r--r--server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java2
-rw-r--r--server/src/test/java/com/vaadin/data/BeanBinderTest.java3
-rw-r--r--server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java7
-rw-r--r--server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java3
-rw-r--r--server/src/test/java/com/vaadin/data/BinderTestBase.java6
-rw-r--r--server/src/test/java/com/vaadin/data/HasValueTest.java2
-rw-r--r--server/src/test/java/com/vaadin/data/ResultTest.java9
-rw-r--r--server/src/test/java/com/vaadin/data/provider/AbstractDataProviderTest.java3
-rw-r--r--server/src/test/java/com/vaadin/data/provider/BackendDataProviderTest.java2
-rw-r--r--server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java3
-rw-r--r--server/src/test/java/com/vaadin/data/provider/DataProviderTestBase.java9
-rw-r--r--server/src/test/java/com/vaadin/data/provider/ListDataProviderTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/validator/StringLengthValidatorTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/data/bean/BeanToValidate.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java59
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java1
-rw-r--r--server/src/test/java/com/vaadin/tests/event/EventRouterTest.java1
-rw-r--r--server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java5
-rw-r--r--server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java11
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractdatefield/AbstractDateFieldDeclarativeTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java1
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java14
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java1
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerAreaDeclarativeTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerDeclarativeTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridDeclarativeTest.java1
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/radiobuttongroup/RadioButtonGroupDeclarativeTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java2
-rw-r--r--server/src/test/java/com/vaadin/ui/AbstractMultiSelectTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/AbstractSingleSelectTest.java5
-rw-r--r--server/src/test/java/com/vaadin/ui/RadioButtonGroupBoVTest.java9
-rw-r--r--server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java4
-rw-r--r--server/src/test/java/com/vaadin/ui/RichTextAreaTest.java11
-rw-r--r--server/src/test/java/com/vaadin/util/CurrentInstanceTest.java25
46 files changed, 122 insertions, 137 deletions
diff --git a/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java b/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java
index af7e613bbf..6c4594eb34 100644
--- a/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java
+++ b/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java
@@ -5,7 +5,7 @@ import com.vaadin.ui.Label;
/*
* This simple test shows the performance difference between the StringTokenizer implementation and the String.split() implementation in AbstractComponent.
* Your results will vary.
- * The real world use case motivating it was a 10k Row table, which generated labels for 10 columns.
+ * The real world use case motivating it was a 10k Row table, which generated labels for 10 columns.
* This is 1/10th of what this performance tester demonstrates.
*
* Please run with -server and -Xloggc:/tmp/gclog.vgc -verbose:gc -XX:+PrintCompilation
diff --git a/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java b/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java
index e0f6e2eaa5..9ed2e8edda 100644
--- a/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java
+++ b/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.TextField;
/**
* Unit tests for {@link BeanBinder#bindInstanceFields(Object)} method.
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/data/BeanBinderTest.java b/server/src/test/java/com/vaadin/data/BeanBinderTest.java
index d45cfe04fd..1b9f2f0ac7 100644
--- a/server/src/test/java/com/vaadin/data/BeanBinderTest.java
+++ b/server/src/test/java/com/vaadin/data/BeanBinderTest.java
@@ -198,7 +198,8 @@ public class BeanBinderTest
private void assertInvalid(HasValue<?> field, String message) {
BinderValidationStatus<?> status = binder.validate();
- List<BindingValidationStatus<?>> errors = status.getFieldValidationErrors();
+ List<BindingValidationStatus<?>> errors = status
+ .getFieldValidationErrors();
assertEquals(1, errors.size());
assertSame(field, errors.get(0).getField());
assertEquals(message, errors.get(0).getMessage().get());
diff --git a/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java b/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java
index bc46395d08..64bde4d772 100644
--- a/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java
+++ b/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java
@@ -97,12 +97,13 @@ public class BinderConverterValidatorTest
binding.bind(Person::getFirstName, Person::setFirstName);
BinderValidationStatus<Person> status = binder.validate();
- List<BindingValidationStatus<?>> errors = status.getFieldValidationErrors();
+ List<BindingValidationStatus<?>> errors = status
+ .getFieldValidationErrors();
assertEquals(1, errors.size());
- BindingValidationStatus<?> validationStatus = errors.stream().findFirst()
- .get();
+ BindingValidationStatus<?> validationStatus = errors.stream()
+ .findFirst().get();
String msg = validationStatus.getMessage().get();
assertEquals(msg1, msg);
diff --git a/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java b/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java
index 820447172e..78a132b04d 100644
--- a/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java
+++ b/server/src/test/java/com/vaadin/data/BinderMultiSelectTest.java
@@ -65,8 +65,7 @@ public class BinderMultiSelectTest
converterBinder.forField(select)
.withConverter(new TestEnumSetToStringConverter())
- .bind(AtomicReference::get,
- AtomicReference::set);
+ .bind(AtomicReference::get, AtomicReference::set);
}
@Test
diff --git a/server/src/test/java/com/vaadin/data/BinderTestBase.java b/server/src/test/java/com/vaadin/data/BinderTestBase.java
index 7a238ac7ce..8cad82d570 100644
--- a/server/src/test/java/com/vaadin/data/BinderTestBase.java
+++ b/server/src/test/java/com/vaadin/data/BinderTestBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2016 Vaadin Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/server/src/test/java/com/vaadin/data/HasValueTest.java b/server/src/test/java/com/vaadin/data/HasValueTest.java
index f250d6a5b6..b40b7e64a1 100644
--- a/server/src/test/java/com/vaadin/data/HasValueTest.java
+++ b/server/src/test/java/com/vaadin/data/HasValueTest.java
@@ -18,8 +18,6 @@ package com.vaadin.data;
import org.junit.Test;
import org.mockito.Mockito;
-import com.vaadin.data.HasValue;
-
/**
* @author Vaadin Ltd
*
diff --git a/server/src/test/java/com/vaadin/data/ResultTest.java b/server/src/test/java/com/vaadin/data/ResultTest.java
index 1dcda58a4d..8f594c1300 100644
--- a/server/src/test/java/com/vaadin/data/ResultTest.java
+++ b/server/src/test/java/com/vaadin/data/ResultTest.java
@@ -15,10 +15,11 @@
*/
package com.vaadin.data;
-import com.vaadin.server.SerializableFunction;
import org.junit.Assert;
import org.junit.Test;
+import com.vaadin.server.SerializableFunction;
+
/**
* @author Vaadin Ltd
*
@@ -70,7 +71,8 @@ public class ResultTest {
Result<String> result = new SimpleResult<String>("foo", null) {
@Override
- public <S> Result<S> flatMap(SerializableFunction<String, Result<S>> mapper) {
+ public <S> Result<S> flatMap(
+ SerializableFunction<String, Result<S>> mapper) {
return mapper.apply("foo");
}
};
@@ -89,7 +91,8 @@ public class ResultTest {
Result<String> result = new SimpleResult<String>("foo", null) {
@Override
- public <S> Result<S> flatMap(SerializableFunction<String, Result<S>> mapper) {
+ public <S> Result<S> flatMap(
+ SerializableFunction<String, Result<S>> mapper) {
return new SimpleResult<>(null, "bar");
}
};
diff --git a/server/src/test/java/com/vaadin/data/provider/AbstractDataProviderTest.java b/server/src/test/java/com/vaadin/data/provider/AbstractDataProviderTest.java
index 58ce4c3f75..5fbaaaeb8a 100644
--- a/server/src/test/java/com/vaadin/data/provider/AbstractDataProviderTest.java
+++ b/server/src/test/java/com/vaadin/data/provider/AbstractDataProviderTest.java
@@ -21,9 +21,6 @@ import java.util.stream.Stream;
import org.junit.Assert;
import org.junit.Test;
-import com.vaadin.data.provider.AbstractDataProvider;
-import com.vaadin.data.provider.DataChangeEvent;
-import com.vaadin.data.provider.Query;
import com.vaadin.shared.Registration;
/**
diff --git a/server/src/test/java/com/vaadin/data/provider/BackendDataProviderTest.java b/server/src/test/java/com/vaadin/data/provider/BackendDataProviderTest.java
index 6e9727af3f..585abc230a 100644
--- a/server/src/test/java/com/vaadin/data/provider/BackendDataProviderTest.java
+++ b/server/src/test/java/com/vaadin/data/provider/BackendDataProviderTest.java
@@ -7,8 +7,6 @@ import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import com.vaadin.data.provider.BackEndDataProvider;
-import com.vaadin.data.provider.SortOrder;
import com.vaadin.server.SerializablePredicate;
import com.vaadin.shared.data.sort.SortDirection;
diff --git a/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java b/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java
index f185d0969e..f49dbf1f88 100644
--- a/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java
+++ b/server/src/test/java/com/vaadin/data/provider/DataCommunicatorTest.java
@@ -21,9 +21,6 @@ import org.junit.Assert;
import org.junit.Test;
import org.mockito.Mockito;
-import com.vaadin.data.provider.DataCommunicator;
-import com.vaadin.data.provider.DataProviderListener;
-import com.vaadin.data.provider.ListDataProvider;
import com.vaadin.server.MockVaadinSession;
import com.vaadin.server.SerializablePredicate;
import com.vaadin.server.VaadinRequest;
diff --git a/server/src/test/java/com/vaadin/data/provider/DataProviderTestBase.java b/server/src/test/java/com/vaadin/data/provider/DataProviderTestBase.java
index fa7ca2d840..da909af29a 100644
--- a/server/src/test/java/com/vaadin/data/provider/DataProviderTestBase.java
+++ b/server/src/test/java/com/vaadin/data/provider/DataProviderTestBase.java
@@ -12,12 +12,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import com.vaadin.data.provider.DataChangeEvent;
-import com.vaadin.data.provider.DataProvider;
-import com.vaadin.data.provider.DataProviderListener;
-import com.vaadin.data.provider.Query;
-import com.vaadin.data.provider.Sort;
-import com.vaadin.data.provider.SortOrder;
import com.vaadin.server.SerializablePredicate;
public abstract class DataProviderTestBase<D extends DataProvider<StrBean, SerializablePredicate<StrBean>>> {
@@ -66,8 +60,7 @@ public abstract class DataProviderTestBase<D extends DataProvider<StrBean, Seria
private Query<StrBean, SerializablePredicate<StrBean>> createQuery(
List<SortOrder<String>> sortOrder, Comparator<StrBean> comp,
SerializablePredicate<StrBean> filter) {
- return new Query<>(0,
- Integer.MAX_VALUE, sortOrder, comp, filter);
+ return new Query<>(0, Integer.MAX_VALUE, sortOrder, comp, filter);
}
private Query<StrBean, SerializablePredicate<StrBean>> createQuery(
diff --git a/server/src/test/java/com/vaadin/data/provider/ListDataProviderTest.java b/server/src/test/java/com/vaadin/data/provider/ListDataProviderTest.java
index 8cb9c2a4fe..148b5f98f8 100644
--- a/server/src/test/java/com/vaadin/data/provider/ListDataProviderTest.java
+++ b/server/src/test/java/com/vaadin/data/provider/ListDataProviderTest.java
@@ -6,10 +6,6 @@ import java.util.List;
import org.junit.Assert;
import org.junit.Test;
-import com.vaadin.data.provider.DataProvider;
-import com.vaadin.data.provider.ListDataProvider;
-import com.vaadin.data.provider.Query;
-import com.vaadin.data.provider.SortOrder;
import com.vaadin.server.SerializablePredicate;
public class ListDataProviderTest
diff --git a/server/src/test/java/com/vaadin/data/validator/StringLengthValidatorTest.java b/server/src/test/java/com/vaadin/data/validator/StringLengthValidatorTest.java
index 7fb1c2ff76..758059c288 100644
--- a/server/src/test/java/com/vaadin/data/validator/StringLengthValidatorTest.java
+++ b/server/src/test/java/com/vaadin/data/validator/StringLengthValidatorTest.java
@@ -7,8 +7,8 @@ import org.junit.Test;
public class StringLengthValidatorTest extends ValidatorTestBase {
- private static final String LONG_STRING = Stream.generate(() -> "x").limit(1000)
- .collect(Collectors.joining());
+ private static final String LONG_STRING = Stream.generate(() -> "x")
+ .limit(1000).collect(Collectors.joining());
@Test
public void testNullStringFails() {
diff --git a/server/src/test/java/com/vaadin/tests/data/bean/BeanToValidate.java b/server/src/test/java/com/vaadin/tests/data/bean/BeanToValidate.java
index 23270cab5e..591debe9ba 100644
--- a/server/src/test/java/com/vaadin/tests/data/bean/BeanToValidate.java
+++ b/server/src/test/java/com/vaadin/tests/data/bean/BeanToValidate.java
@@ -99,7 +99,7 @@ public class BeanToValidate {
}
public void setAddresses(Address[] address) {
- this.addresses = address;
+ addresses = address;
}
public Address getAddress() {
diff --git a/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java b/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java
index 1aacaf44cc..98224d90c1 100644
--- a/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java
@@ -24,7 +24,6 @@ import org.junit.Assert;
import org.junit.Test;
import com.vaadin.ui.AbstractComponent;
-import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.Design.ComponentFactory;
@@ -40,15 +39,16 @@ public class ComponentFactoryTest {
// Set static component factory that delegate to a thread local factory
static {
- Design.setComponentFactory((String fullyQualifiedClassName, DesignContext context) -> {
- ComponentFactory componentFactory = currentComponentFactory
- .get();
- if (componentFactory == null) {
- componentFactory = defaultFactory;
- }
- return componentFactory.createComponent(fullyQualifiedClassName,
- context);
- });
+ Design.setComponentFactory(
+ (String fullyQualifiedClassName, DesignContext context) -> {
+ ComponentFactory componentFactory = currentComponentFactory
+ .get();
+ if (componentFactory == null) {
+ componentFactory = defaultFactory;
+ }
+ return componentFactory
+ .createComponent(fullyQualifiedClassName, context);
+ });
}
@Test(expected = IllegalArgumentException.class)
@@ -59,11 +59,13 @@ public class ComponentFactoryTest {
@Test
public void testComponentFactoryLogging() {
final List<String> messages = new ArrayList<>();
- currentComponentFactory.set((ComponentFactory) (String fullyQualifiedClassName, DesignContext context) -> {
- messages.add("Requested class " + fullyQualifiedClassName);
- return defaultFactory.createComponent(fullyQualifiedClassName,
- context);
- });
+ currentComponentFactory
+ .set((ComponentFactory) (String fullyQualifiedClassName,
+ DesignContext context) -> {
+ messages.add("Requested class " + fullyQualifiedClassName);
+ return defaultFactory
+ .createComponent(fullyQualifiedClassName, context);
+ });
Design.read(new ByteArrayInputStream("<vaadin-label />".getBytes()));
@@ -75,15 +77,24 @@ public class ComponentFactoryTest {
@Test(expected = DesignException.class)
public void testComponentFactoryReturningNull() {
- currentComponentFactory.set((ComponentFactory) (String fullyQualifiedClassName, DesignContext context) -> null);
+ currentComponentFactory
+ .set((ComponentFactory) (String fullyQualifiedClassName,
+ DesignContext context) -> null);
Design.read(new ByteArrayInputStream("<vaadin-label />".getBytes()));
}
@Test(expected = DesignException.class)
public void testComponentFactoryThrowingStuff() {
- currentComponentFactory.set((ComponentFactory) (String fullyQualifiedClassName, DesignContext context) -> defaultFactory.createComponent(
- "foobar." + fullyQualifiedClassName, context) // Will throw because class is not found
+ currentComponentFactory.set((ComponentFactory) (
+ String fullyQualifiedClassName,
+ DesignContext context) -> defaultFactory.createComponent(
+ "foobar." + fullyQualifiedClassName, context) // Will
+ // throw
+ // because
+ // class
+ // is not
+ // found
);
Design.read(new ByteArrayInputStream("<vaadin-label />".getBytes()));
@@ -92,11 +103,13 @@ public class ComponentFactoryTest {
@Test
public void testGetDefaultInstanceUsesComponentFactory() {
final List<String> classes = new ArrayList<>();
- currentComponentFactory.set((ComponentFactory) (String fullyQualifiedClassName, DesignContext context) -> {
- classes.add(fullyQualifiedClassName);
- return defaultFactory.createComponent(fullyQualifiedClassName,
- context);
- });
+ currentComponentFactory
+ .set((ComponentFactory) (String fullyQualifiedClassName,
+ DesignContext context) -> {
+ classes.add(fullyQualifiedClassName);
+ return defaultFactory
+ .createComponent(fullyQualifiedClassName, context);
+ });
DesignContext designContext = new DesignContext();
designContext.getDefaultInstance(new DefaultInstanceTestComponent());
diff --git a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
index 30c07ccb11..f448f5c2b2 100644
--- a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
@@ -361,8 +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<>(
- act.getModifiers().length);
+ 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
for (int mod : act.getModifiers()) {
diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
index cfea7a6fda..f3a44a7bf2 100644
--- a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
+++ b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
@@ -16,7 +16,6 @@
package com.vaadin.tests.design.designroot;
import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Notification;
import com.vaadin.ui.TextField;
diff --git a/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java b/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java
index 7286b7ea2d..a290d43ea3 100644
--- a/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java
+++ b/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java
@@ -23,7 +23,6 @@ import org.junit.Before;
import org.junit.Test;
import com.vaadin.event.EventRouter;
-import com.vaadin.server.ErrorEvent;
import com.vaadin.server.ErrorHandler;
import com.vaadin.ui.Component;
import com.vaadin.ui.Component.Listener;
diff --git a/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java b/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java
index 90bc775efa..f701e089ce 100644
--- a/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java
+++ b/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java
@@ -98,8 +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<>(
- act.getModifiers().length);
+ 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
for (int mod : act.getModifiers()) {
diff --git a/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java b/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java
index e33f8373ce..8a97e2217c 100644
--- a/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java
@@ -14,6 +14,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
@@ -30,7 +31,6 @@ import org.junit.Assert;
import org.junit.Test;
import com.vaadin.ui.Component;
-import java.util.Arrays;
public class ClassesSerializableTest {
@@ -42,7 +42,8 @@ public class ClassesSerializableTest {
private static final String[] BASE_PACKAGES = { "com.vaadin" };
- private static final String[] EXCLUDED_PATTERNS = { "com\\.vaadin\\.demo\\..*", //
+ private static final String[] EXCLUDED_PATTERNS = {
+ "com\\.vaadin\\.demo\\..*", //
"com\\.vaadin\\.external\\.org\\.apache\\.commons\\.fileupload\\..*", //
"com\\.vaadin\\.launcher\\..*", //
"com\\.vaadin\\.client\\..*", //
diff --git a/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java b/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
index 7a44e861da..65b7b437e0 100644
--- a/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
@@ -160,7 +160,9 @@ public class AttachDetachListenersTest {
@Override
public void appendTo(StringBuffer buffer) {
buffer.append("EventEquals(");
- buffer.append("expected ").append(expected.getClass().getSimpleName()).append(" with connector ").append(expected.getConnector());
+ buffer.append("expected ")
+ .append(expected.getClass().getSimpleName())
+ .append(" with connector ").append(expected.getConnector());
buffer.append(")");
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java b/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
index 7aabfe4f7f..b333c89fc8 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
@@ -35,8 +35,8 @@ public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler
MarginInfo m = new MarginInfo(top, right, bottom, left);
- String design = getMarginTag(componentTag, defaultMargin, top, right, bottom,
- left);
+ String design = getMarginTag(componentTag, defaultMargin, top,
+ right, bottom, left);
// The assertEquals machinery in DeclarativeTestBase uses bean
// introspection and MarginInfo is not a proper bean. It ends up
@@ -48,14 +48,13 @@ public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler
}
}
- private String getMarginTag(String componentTag, boolean defaultMargin, boolean top, boolean right,
- boolean bottom, boolean left) {
+ private String getMarginTag(String componentTag, boolean defaultMargin,
+ boolean top, boolean right, boolean bottom, boolean left) {
String s = "<" + componentTag + " ";
String suffix = defaultMargin ? "=false " : " ";
if (top == left && top == right && top == bottom) {
- if(top != defaultMargin)
- {
+ if (top != defaultMargin) {
s += "margin" + suffix;
}
} else {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractdatefield/AbstractDateFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractdatefield/AbstractDateFieldDeclarativeTest.java
index 880a6a47f7..dcda449615 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractdatefield/AbstractDateFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractdatefield/AbstractDateFieldDeclarativeTest.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.AbstractDateField;
* declarative test for a real component should extend it and implement abstract
* methods to be able to test the common properties. Components specific
* properties should be tested additionally in the subclasses implementations.
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
index 7e84bce54c..84b4b6135d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
@@ -18,7 +18,6 @@ package com.vaadin.tests.server.component.abstractorderedlayout;
import java.util.Arrays;
import java.util.List;
-import org.junit.Ignore;
import org.junit.Test;
import com.vaadin.shared.ui.label.ContentMode;
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
index a2a25cb818..2da2d6aede 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
@@ -73,11 +73,11 @@ public class RemoveFromParentLockingTest {
try {
target.addComponent(testComponent);
throw new AssertionError(
- "Moving component when not holding its sessions's lock should throw");
+ "Moving component when not holding its sessions's lock should throw");
} catch (IllegalStateException e) {
Assert.assertEquals(
- "Cannot remove from parent when the session is not locked.",
- e.getMessage());
+ "Cannot remove from parent when the session is not locked.",
+ e.getMessage());
}
}
@@ -106,12 +106,12 @@ public class RemoveFromParentLockingTest {
try {
lockedComponent.addComponent(notLockedComponent);
throw new AssertionError(
- "Moving component when not holding its sessions's lock should throw");
+ "Moving component when not holding its sessions's lock should throw");
} catch (IllegalStateException e) {
Assert.assertEquals(
- "Cannot remove from parent when the session is not locked."
- + " Furthermore, there is another locked session, indicating that the component might be about to be moved from one session to another.",
- e.getMessage());
+ "Cannot remove from parent when the session is not locked."
+ + " Furthermore, there is another locked session, indicating that the component might be about to be moved from one session to another.",
+ e.getMessage());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java
index eede9138c8..00bba9cd1d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java
@@ -8,7 +8,6 @@ import org.junit.Test;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.UI;
/**
diff --git a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
index 2c646e47a0..990121e704 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.AbstractColorPicker.PopupStyle;
* declarative test for a real component should extend it and implement abstract
* methods to be able to test the common properties. Components specific
* properties should be tested additionally in the subclasses implementations.
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerAreaDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerAreaDeclarativeTest.java
index 715acfd050..4169906629 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerAreaDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerAreaDeclarativeTest.java
@@ -20,7 +20,7 @@ import com.vaadin.ui.ColorPickerArea;
/**
* Declarative test for ColorPickerArea. Provides only information about
* ColorPickerArea class. All tests are in the superclass.
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerDeclarativeTest.java
index 41d730eb18..e76e1d6c01 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorPickerDeclarativeTest.java
@@ -20,7 +20,7 @@ import com.vaadin.ui.ColorPicker;
/**
* Declarative test for ColorPicker. Provides only information about
* ColorPickerArea class. All tests are in the superclass.
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
index c35af4a6a2..1677f8699b 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
@@ -100,8 +100,9 @@ public class ComboBoxDeclarativeTest
Method writeMethod) {
if (readMethod != null) {
Class<?> returnType = readMethod.getReturnType();
- if (StyleGenerator.class.equals(returnType))
+ if (StyleGenerator.class.equals(returnType)) {
return false;
+ }
}
return super.acceptProperty(clazz, readMethod, writeMethod);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridDeclarativeTest.java
index d8b75b130e..8c435f831d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridDeclarativeTest.java
@@ -586,6 +586,7 @@ public class GridDeclarativeTest extends AbstractListingDeclarativeTest<Grid> {
return testRead(design, expected, false);
}
+ @Override
@SuppressWarnings("rawtypes")
public Grid<?> testRead(String design, Grid expected, boolean retestWrite) {
return testRead(design, expected, retestWrite, false);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
index 43176a5ce8..6b81df7e70 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
@@ -22,7 +22,6 @@ import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
-import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.tests.server.component.DeclarativeMarginTestBase;
import com.vaadin.ui.Alignment;
@@ -38,7 +37,7 @@ public class GridLayoutDeclarativeTest
@Test
public void testMargins() {
- testMargins("vaadin-grid-layout",false);
+ testMargins("vaadin-grid-layout", false);
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
index a71aed674b..baae580ccc 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
@@ -26,9 +26,9 @@ import com.vaadin.ui.ListSelect;
* There is only {@link ListSelect#setRows(int)}/{@link ListSelect#getRows()}
* explicit test. All other tests are in the super class (
* {@link AbstractMultiSelectDeclarativeTest}).
- *
+ *
* @see AbstractMultiSelectDeclarativeTest
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
index f7114394d4..2b80546e80 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
@@ -22,7 +22,7 @@ import com.vaadin.ui.NativeSelect;
* Declarative support tests for {@link NativeSelect}. All tests are in the
* super class ({@link AbstractSingleSelectDeclarativeTest}). This class
* declares only tag name and native select class (test parameters).
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
index c7908fd6b0..bb96bf0c3d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
@@ -22,7 +22,7 @@ import com.vaadin.ui.TextField;
/**
* Declarative test for PasswordField. Provides only information about
* ColorPickerArea class. All tests are in the superclass.
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/radiobuttongroup/RadioButtonGroupDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/radiobuttongroup/RadioButtonGroupDeclarativeTest.java
index d25c12a4d7..fbc1d912a9 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/radiobuttongroup/RadioButtonGroupDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/radiobuttongroup/RadioButtonGroupDeclarativeTest.java
@@ -29,9 +29,9 @@ import com.vaadin.ui.RadioButtonGroup;
* Only {@link RadioButtonGroup#setHtmlContentAllowed(boolean)} is tested here
* explicitly. All other tests are in the super class (
* {@link AbstractSingleSelectDeclarativeTest}).
- *
+ *
* @see AbstractSingleSelectDeclarativeTest
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
index 60ec97ad50..b48a3477ab 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
@@ -7,6 +7,7 @@ import static org.junit.Assert.assertSame;
import java.util.Iterator;
+import org.junit.Assert;
import org.junit.Test;
import com.vaadin.ui.Component;
@@ -15,7 +16,6 @@ import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
import com.vaadin.ui.TabSheet.Tab;
-import org.junit.Assert;
public class TabSheetTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
index 99841e9cf9..5f1eba4176 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
@@ -25,9 +25,9 @@ import com.vaadin.ui.TwinColSelect;
* <p>
* There are only TwinColSelect specific properties explicit tests. All other
* tests are in the super class ( {@link AbstractMultiSelectDeclarativeTest}).
- *
+ *
* @see AbstractMultiSelectDeclarativeTest
- *
+ *
* @author Vaadin Ltd
*
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java b/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
index 872683cec3..8416a216c1 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
@@ -11,9 +11,7 @@ import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinSession;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.ui.HasComponents.ComponentAttachEvent;
-import com.vaadin.ui.HasComponents.ComponentAttachListener;
import com.vaadin.ui.HasComponents.ComponentDetachEvent;
-import com.vaadin.ui.HasComponents.ComponentDetachListener;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
diff --git a/server/src/test/java/com/vaadin/ui/AbstractMultiSelectTest.java b/server/src/test/java/com/vaadin/ui/AbstractMultiSelectTest.java
index 68461b676f..d98477c66d 100644
--- a/server/src/test/java/com/vaadin/ui/AbstractMultiSelectTest.java
+++ b/server/src/test/java/com/vaadin/ui/AbstractMultiSelectTest.java
@@ -37,8 +37,8 @@ import org.junit.runners.Parameterized.Parameters;
import org.mockito.Mockito;
import com.vaadin.data.HasValue.ValueChangeEvent;
-import com.vaadin.data.provider.DataProvider;
import com.vaadin.data.Listing;
+import com.vaadin.data.provider.DataProvider;
import com.vaadin.event.selection.MultiSelectionEvent;
import com.vaadin.event.selection.MultiSelectionListener;
import com.vaadin.shared.Registration;
@@ -318,8 +318,8 @@ public class AbstractMultiSelectTest<S extends AbstractMultiSelect<String> & Lis
Assert.assertSame(registration, actualRegistration);
- selectionListener.get().selectionChange(new MultiSelectionEvent<>(select,
- Mockito.mock(Set.class), true));
+ selectionListener.get().selectionChange(new MultiSelectionEvent<>(
+ select, Mockito.mock(Set.class), true));
Assert.assertEquals(select, event.get().getComponent());
Assert.assertEquals(set, event.get().getValue());
diff --git a/server/src/test/java/com/vaadin/ui/AbstractSingleSelectTest.java b/server/src/test/java/com/vaadin/ui/AbstractSingleSelectTest.java
index 51e4fa71e9..1b814921e7 100644
--- a/server/src/test/java/com/vaadin/ui/AbstractSingleSelectTest.java
+++ b/server/src/test/java/com/vaadin/ui/AbstractSingleSelectTest.java
@@ -32,9 +32,9 @@ import org.junit.Test;
import org.mockito.Mockito;
import com.vaadin.data.HasValue.ValueChangeEvent;
+import com.vaadin.data.Listing;
import com.vaadin.data.provider.DataProvider;
import com.vaadin.data.provider.bov.Person;
-import com.vaadin.data.Listing;
import com.vaadin.event.selection.SingleSelectionEvent;
import com.vaadin.event.selection.SingleSelectionListener;
import com.vaadin.shared.Registration;
@@ -81,8 +81,7 @@ public class AbstractSingleSelectTest {
listing = new PersonListing();
listing.setItems(PERSON_A, PERSON_B, PERSON_C);
selectionChanges = new ArrayList<>();
- listing.addSelectionListener(
- e -> selectionChanges.add(e.getValue()));
+ listing.addSelectionListener(e -> selectionChanges.add(e.getValue()));
}
public static final Person PERSON_C = new Person("c", 3);
diff --git a/server/src/test/java/com/vaadin/ui/RadioButtonGroupBoVTest.java b/server/src/test/java/com/vaadin/ui/RadioButtonGroupBoVTest.java
index 2fa64ee0ec..82124454e2 100644
--- a/server/src/test/java/com/vaadin/ui/RadioButtonGroupBoVTest.java
+++ b/server/src/test/java/com/vaadin/ui/RadioButtonGroupBoVTest.java
@@ -23,20 +23,15 @@ import java.util.EnumSet;
* @author Vaadin Ltd
* @since 8.0
*/
-public class RadioButtonGroupBoVTest
-{
+public class RadioButtonGroupBoVTest {
public enum Status {
- STATE_A,
- STATE_B,
- STATE_C,
- STATE_D;
+ STATE_A, STATE_B, STATE_C, STATE_D;
public String getCaption() {
return "** " + toString();
}
}
-
public void createOptionGroup() {
RadioButtonGroup<Status> s = new RadioButtonGroup<>();
s.setItems(EnumSet.allOf(Status.class));
diff --git a/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java b/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java
index 8dfbc70e56..281690d7ee 100644
--- a/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java
+++ b/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java
@@ -34,8 +34,8 @@ public class RadioButtonGroupTest {
public void setUp() {
radioButtonGroup = new RadioButtonGroup<>();
// Intentional deviation from upcoming selection order
- radioButtonGroup
- .setDataProvider(DataProvider.create("Third", "Second", "First"));
+ radioButtonGroup.setDataProvider(
+ DataProvider.create("Third", "Second", "First"));
}
@Test
diff --git a/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java b/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java
index a18105b5bb..56f1293556 100644
--- a/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java
+++ b/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java
@@ -15,6 +15,11 @@
*/
package com.vaadin.ui;
+import static com.vaadin.ui.ComponentTest.getRpcProxy;
+import static com.vaadin.ui.ComponentTest.isDirty;
+import static com.vaadin.ui.ComponentTest.syncToClient;
+import static com.vaadin.ui.ComponentTest.updateDiffState;
+
import org.junit.Assert;
import org.junit.Test;
@@ -22,12 +27,8 @@ import com.vaadin.server.ClientConnector;
import com.vaadin.server.ServerRpcManager.RpcInvocationException;
import com.vaadin.shared.ui.richtextarea.RichTextAreaServerRpc;
import com.vaadin.tests.util.MockUI;
-import static com.vaadin.ui.ComponentTest.getRpcProxy;
-import static com.vaadin.ui.ComponentTest.isDirty;
-import static com.vaadin.ui.ComponentTest.syncToClient;
-import static com.vaadin.ui.ComponentTest.updateDiffState;
-public class RichTextAreaTest {
+public class RichTextAreaTest {
@Test
public void initiallyEmpty() {
diff --git a/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java b/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java
index 3505ef7532..e2da8e0278 100644
--- a/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java
+++ b/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java
@@ -15,14 +15,7 @@
*/
package com.vaadin.util;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.server.VaadinService;
-import com.vaadin.server.VaadinSession;
-import com.vaadin.ui.UI;
-import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertNull;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
@@ -33,7 +26,15 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
-import static org.junit.Assert.assertNull;
+import org.easymock.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinService;
+import com.vaadin.server.VaadinSession;
+import com.vaadin.ui.UI;
public class CurrentInstanceTest {
@@ -78,8 +79,7 @@ public class CurrentInstanceTest {
IllegalAccessException {
Field f = CurrentInstance.class.getDeclaredField("instances");
f.setAccessible(true);
- return (ThreadLocal<Map<Class<?>, CurrentInstance>>) f
- .get(null);
+ return (ThreadLocal<Map<Class<?>, CurrentInstance>>) f.get(null);
}
public void testInheritedClearedAfterRemove() {
@@ -149,8 +149,7 @@ public class CurrentInstanceTest {
.setCurrent(session2);
// Use weak ref to verify object is collected
- WeakReference<VaadinSession> ref = new WeakReference<>(
- session1);
+ WeakReference<VaadinSession> ref = new WeakReference<>(session1);
session1 = null;
waitUntilGarbageCollected(ref);