aboutsummaryrefslogtreecommitdiffstats
path: root/compatibility-server/src/main
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 /compatibility-server/src/main
parentd3c752e0f2abec08cd98a66495d1345ad0f56d83 (diff)
downloadvaadin-framework-40d15b32e341a38dacc24cc3ec79ab3ff0a25a50.tar.gz
vaadin-framework-40d15b32e341a38dacc24cc3ec79ab3ff0a25a50.zip
Construct array inline (#10068)
And some trivial test enhancements
Diffstat (limited to 'compatibility-server/src/main')
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java3
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/util/SerializerHelper.java2
4 files changed, 5 insertions, 4 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java
index 33635004ef..d672ad5b82 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java
@@ -116,9 +116,10 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
return null;
}
+ @SuppressWarnings("unchecked")
private <T extends Field> T createDateField(Class<?> type,
Class<T> fieldType) {
- AbstractField field;
+ AbstractField<?> field;
if (InlineDateField.class.isAssignableFrom(fieldType)) {
field = new InlineDateField();
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
index dd1f28305d..1799bdc72e 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
@@ -103,7 +103,7 @@ public class FilesystemContainer implements Container.Hierarchical {
}
}
- private File[] roots = new File[] {};
+ private File[] roots = {};
private FilenameFilter filter = null;
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
index 4eb44994aa..653ad3f6bf 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
@@ -1766,7 +1766,7 @@ public abstract class AbstractField<T> extends AbstractLegacyComponent
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
- AbstractField def = (AbstractField) designContext
+ AbstractField<?> def = designContext
.getDefaultInstance(this);
Attributes attr = design.attributes();
// handle readonly
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/util/SerializerHelper.java b/compatibility-server/src/main/java/com/vaadin/v7/util/SerializerHelper.java
index d0ad569988..62452e974d 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/util/SerializerHelper.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/util/SerializerHelper.java
@@ -107,7 +107,7 @@ public class SerializerHelper {
* List of primitive classes. Google App Engine has problems
* serializing/deserializing these (#3064).
*/
- private static final Class<?>[] primitiveClasses = new Class<?>[] {
+ private static final Class<?>[] primitiveClasses = {
byte.class, short.class, int.class, long.class, float.class,
double.class, boolean.class, char.class };