Revision: 8866
Author: [email protected]
Date: Fri Sep 24 06:17:22 2010
Log: Fix IncompatibleRemoteServiceException in GWTTestCases under JUnit4.
http://gwt-code-reviews.appspot.com/916801/show
Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=8866
Modified:
/trunk/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
=======================================
--- /trunk/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
Mon Sep 20 15:25:50 2010
+++ /trunk/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
Fri Sep 24 06:17:22 2010
@@ -60,6 +60,12 @@
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");
}
/**
=======================================
---
/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
Mon Jan 25 07:14:47 2010
+++
/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
Fri Sep 24 06:17:22 2010
@@ -110,6 +110,17 @@
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