diff options
author | Artur Signell <artur@vaadin.com> | 2013-05-27 21:38:25 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-05-28 10:13:56 +0300 |
commit | 2882cf98756974f40ba98d66c7d7318db6acd538 (patch) | |
tree | 4ea30c0cf6eb6118b93cf9a482d4758d36ad4be4 /server/tests | |
parent | f7f1e3ece5206c335487ce25f4e709370024109d (diff) | |
download | vaadin-framework-2882cf98756974f40ba98d66c7d7318db6acd538.tar.gz vaadin-framework-2882cf98756974f40ba98d66c7d7318db6acd538.zip |
Added Serializable where missing and ignore classes which do not need Serializable
Change-Id: I197b2d62282ee957458e05d9cac357df47f05e85
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java index 90cb6b9994..af6d9ed732 100644 --- a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java +++ b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java @@ -7,6 +7,7 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.Enumeration; import java.util.Iterator; import java.util.List; @@ -33,6 +34,7 @@ public class TestClassesSerializable extends TestCase { "com\\.vaadin\\.launcher\\..*", // "com\\.vaadin\\.client\\..*", // "com\\.vaadin\\.server\\.widgetsetutils\\..*", // + "com\\.vaadin\\.server\\.themeutils\\..*", // "com\\.vaadin\\.tests\\..*", // exclude automated tests "com\\.vaadin\\.tools\\..*", // "com\\.vaadin\\.ui\\.themes\\..*", // @@ -41,7 +43,13 @@ public class TestClassesSerializable extends TestCase { "com\\.vaadin\\.event\\.LayoutEvents", // "com\\.vaadin\\.event\\.MouseEvents", // "com\\.vaadin\\.server\\.VaadinPortlet", // + "com\\.vaadin\\.server\\.MockServletConfig", // + "com\\.vaadin\\.server\\.MockServletContext", // "com\\.vaadin\\.server\\.Constants", // + "com\\.vaadin\\.server\\.communication\\.FileUploadHandler\\$SimpleMultiPartInputStream", // + "com\\.vaadin\\.server\\.communication\\.PushRequestHandler.*", + "com\\.vaadin\\.server\\.communication\\.PushHandler.*", // PushHandler + // and its inner classes do not need to be serializable "com\\.vaadin\\.util\\.SerializerHelper", // fully static // class level filtering, also affecting nested classes and // interfaces @@ -50,6 +58,7 @@ public class TestClassesSerializable extends TestCase { "com\\.vaadin\\.util\\.ReflectTools.*", // "com\\.vaadin\\.data\\.util\\.ReflectTools.*", // "com\\.vaadin\\.sass.*", // + "com\\.vaadin\\.testbench.*", // "com\\.vaadin\\.util\\.CurrentInstance\\$1", // }; @@ -88,6 +97,19 @@ public class TestClassesSerializable extends TestCase { // report non-serializable classes and interfaces if (!Serializable.class.isAssignableFrom(cls)) { + if (cls.getSuperclass() == Object.class + && cls.getInterfaces().length == 1) { + // Single interface implementors + Class<?> iface = cls.getInterfaces()[0]; + + if (iface == Runnable.class) { + // Ignore Runnables used with access() + continue; + } else if (iface == Comparator.class) { + // Ignore inline comparators + continue; + } + } nonSerializableClasses.add(cls); // TODO easier to read when testing // System.err.println(cls); |