From: Artur Signell Date: Tue, 13 Mar 2012 08:22:36 +0000 (+0200) Subject: Better error reporting for anonymous classes X-Git-Tag: 7.0.0.alpha2~346 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd871b7bc451d89fe1c27535d65c1d182e9da7a5;p=vaadin-framework.git Better error reporting for anonymous classes --- diff --git a/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java b/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java index c047565fcc..486b1ba0c1 100644 --- a/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java +++ b/tests/server-side/com/vaadin/tests/server/TestClassesSerializable.java @@ -98,9 +98,19 @@ public class TestClassesSerializable extends TestCase { if (!nonSerializableClasses.isEmpty()) { String nonSerializableString = ""; Iterator> it = nonSerializableClasses.iterator(); - nonSerializableString = it.next().getName(); while (it.hasNext()) { - nonSerializableString += ", " + it.next().getName(); + Class c = it.next(); + nonSerializableString += ", " + c.getName(); + if (c.isAnonymousClass()) { + nonSerializableString += "(super: "; + nonSerializableString += c.getSuperclass().getName(); + nonSerializableString += ", interfaces: "; + for (Class i : c.getInterfaces()) { + nonSerializableString += i.getName(); + nonSerializableString += ","; + } + nonSerializableString += ")"; + } } fail("Serializable not implemented by the following classes and interfaces: " + nonSerializableString);