summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-23 08:45:49 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-23 09:45:49 +0300
commit40d15b32e341a38dacc24cc3ec79ab3ff0a25a50 (patch)
treeea0f03e7e3b4ed2af1e632065b4c7e8c30eb9d76 /server
parentd3c752e0f2abec08cd98a66495d1345ad0f56d83 (diff)
downloadvaadin-framework-40d15b32e341a38dacc24cc3ec79ab3ff0a25a50.tar.gz
vaadin-framework-40d15b32e341a38dacc24cc3ec79ab3ff0a25a50.zip
Construct array inline (#10068)
And some trivial test enhancements
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractComponent.java2
-rw-r--r--server/src/test/java/com/vaadin/data/provider/StrBean.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxFilteringTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java2
-rw-r--r--server/src/test/java/com/vaadin/ui/AbstractListingTest.java2
10 files changed, 10 insertions, 10 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractComponent.java b/server/src/main/java/com/vaadin/ui/AbstractComponent.java
index 70e77e71f7..a0bb648ffb 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractComponent.java
@@ -1257,7 +1257,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
return l;
}
- private static final String[] customAttributes = new String[] { "width",
+ private static final String[] customAttributes = { "width",
"height", "debug-id", "error", "width-auto", "height-auto",
"width-full", "height-full", "size-auto", "size-full", "immediate",
"locale", "read-only", "_id" };
diff --git a/server/src/test/java/com/vaadin/data/provider/StrBean.java b/server/src/test/java/com/vaadin/data/provider/StrBean.java
index 6deb1c1af6..0004421f8c 100644
--- a/server/src/test/java/com/vaadin/data/provider/StrBean.java
+++ b/server/src/test/java/com/vaadin/data/provider/StrBean.java
@@ -8,7 +8,7 @@ import java.util.Random;
public class StrBean implements Serializable {
- private static final String[] values = new String[] { "Foo", "Bar", "Baz" };
+ private static final String[] values = { "Foo", "Bar", "Baz" };
private String value;
private final int id;
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java
index dbcb9d6ba0..8ea4e7a558 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java
@@ -22,7 +22,7 @@ public class StringToIntegerConverterTest extends AbstractConverterTest {
@Test
public void testValueOutOfRange() {
- Double[] values = new Double[] { Integer.MAX_VALUE * 2.0,
+ Double[] values = { Integer.MAX_VALUE * 2.0,
Integer.MIN_VALUE * 2.0, Long.MAX_VALUE * 2.0,
Long.MIN_VALUE * 2.0 };
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java
index 36e54a2826..7ea028a594 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AddComponentsTest.java
@@ -18,7 +18,7 @@ import com.vaadin.ui.VerticalLayout;
public class AddComponentsTest {
- Component[] children = new Component[] { new Label("A"), new Label("B"),
+ Component[] children = { new Label("A"), new Label("B"),
new Label("C"), new Label("D") };
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxFilteringTest.java b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxFilteringTest.java
index f2c4b11689..35c28eba17 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxFilteringTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxFilteringTest.java
@@ -42,7 +42,7 @@ import com.vaadin.ui.ComboBox;
* @author Vaadin Ltd
*/
public class ComboBoxFilteringTest {
- private static final String[] PERSON_NAMES = new String[] {
+ private static final String[] PERSON_NAMES = {
"Enrique Iglesias", "Henry Dunant", "Erwin Engelbrecht" };
private ComboBox<Person> comboBox;
diff --git a/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java b/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java
index 9fe1e4210a..ac571fd7ac 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java
@@ -16,7 +16,7 @@ import com.vaadin.ui.Layout;
public class AddComponentsTest {
- private final Component[] children = new Component[] { new Label("A"),
+ private final Component[] children = { new Label("A"),
new Label("B"), new Label("C"), new Label("D") };
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutTest.java b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutTest.java
index 64b466612f..414768d028 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutTest.java
@@ -16,7 +16,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
public class GridLayoutTest {
- Component[] children = new Component[] { new Label("A"), new Label("B"),
+ Component[] children = { new Label("A"), new Label("B"),
new Label("C"), new Label("D") };
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java b/server/src/test/java/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java
index 29dfd08212..53bb87717f 100644
--- a/server/src/test/java/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java
@@ -43,7 +43,7 @@ public class FormLayoutTest extends AbstractIndexedLayoutTestBase {
return getLayout().getComponentCount();
}
- Component[] children = new Component[] { new Label("A"), new Label("B"),
+ Component[] children = { new Label("A"), new Label("B"),
new Label("C"), new Label("D") };
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java b/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
index 31e1c53ec6..636c226e66 100644
--- a/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
@@ -898,7 +898,7 @@ public class NavigatorTest {
};
- final int[] count = new int[] { 0 };
+ final int[] count = { 0 };
Navigator navigator = new Navigator(createMockUI(), manager,
EasyMock.createMock(ViewDisplay.class)) {
@Override
diff --git a/server/src/test/java/com/vaadin/ui/AbstractListingTest.java b/server/src/test/java/com/vaadin/ui/AbstractListingTest.java
index 400105567d..deafe8368e 100644
--- a/server/src/test/java/com/vaadin/ui/AbstractListingTest.java
+++ b/server/src/test/java/com/vaadin/ui/AbstractListingTest.java
@@ -73,7 +73,7 @@ public class AbstractListingTest {
}
}
- private static final String[] ITEM_ARRAY = new String[] { "Foo", "Bar",
+ private static final String[] ITEM_ARRAY = { "Foo", "Bar",
"Baz" };
private TestListing listing;