Reviewers: fabbott,
Please review this at http://gwt-code-reviews.appspot.com/916801/show
Affected files:
M user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
M user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
Index: user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
diff --git
a/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
b/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
index
22873c358efc3c34580b195a03ceb86ea73fe706..c8e05ba456db4c827c25c4eedd2f5425bb5786b8
100644
--- a/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
+++ b/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
@@ -60,6 +60,12 @@ public class SerializationUtils {
TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add("java.lang.Short");
TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add("java.lang.String");
TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add("java.lang.Throwable");
+
+ /*
+ * Work around for incompatible type hierarchy (and therefore
signature)
+ * between JUnit3 and JUnit4.
+ */
+
TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add("junit.framework.AssertionFailedError");
}
/**
Index: user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
diff --git
a/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
b/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
index
faad03ac08b4a0a9e3172ee8814e50bf96bd9093..12ea78c975f2fd2f49b78df0cd7399b091e7d78c
100644
--- a/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
+++ b/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
@@ -110,6 +110,17 @@ public class SerializabilityUtil {
TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add(Short.class);
TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add(String.class);
TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add(Throwable.class);
+
+ try {
+ /*
+ * Work around for incompatible type hierarchy (and therefore
signature)
+ * between JUnit3 and JUnit4. Do this via reflection so we don't
force the
+ * server to depend on JUnit.
+ */
+ Class<?> clazz =
Class.forName("junit.framework.AssertionFailedError");
+ TYPES_WHOSE_IMPLEMENTATION_IS_EXCLUDED_FROM_SIGNATURES.add(clazz);
+ } catch (ClassNotFoundException dontCare) {
+ }
}
/**
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors