Fix for errors in type checking of GWT LogRecord. The incorrect type
was being checked for, and the method signature for the instantiate
method was incorrect. And the test method was not doing the right thing
so that the error was never caught. I have now verified that the test
does catch the existing problems, and fixed the problems themselves.

Review by: jat@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10556 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/server/rpc/core/java/util/logging/LogRecord_ServerCustomFieldSerializer.java b/user/src/com/google/gwt/user/server/rpc/core/java/util/logging/LogRecord_ServerCustomFieldSerializer.java
index d89246a..e93815f 100644
--- a/user/src/com/google/gwt/user/server/rpc/core/java/util/logging/LogRecord_ServerCustomFieldSerializer.java
+++ b/user/src/com/google/gwt/user/server/rpc/core/java/util/logging/LogRecord_ServerCustomFieldSerializer.java
@@ -37,7 +37,7 @@
       Class<?> instanceClass, DequeMap<Type, Type> resolvedTypes) throws SerializationException {
     String loggerName = streamReader.readString();
     Long millis = streamReader.readLong();
-    Object throwable = streamReader.readObject(Throwable.class, resolvedTypes);
+    Object throwable = streamReader.readObject(SerializableThrowable.class, resolvedTypes);
 
     instance.setLoggerName(loggerName);
     instance.setMillis(millis);
@@ -64,8 +64,8 @@
   }
 
   @Override
-  public LogRecord instantiateInstance(ServerSerializationStreamReader reader)
-      throws SerializationException {
+  public LogRecord instantiateInstance(ServerSerializationStreamReader reader, Class<?> instanceClass,
+      DequeMap<Type, Type> resolvedTypes) throws SerializationException {
     return LogRecord_CustomFieldSerializer.instantiate(reader);
   }
 
diff --git a/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java b/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java
index b451e60..365ce4a 100644
--- a/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java
+++ b/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java
@@ -98,6 +98,7 @@
     service.echoLogRecord(expectedLogRecord, new AsyncCallback<LogRecord>() {
       public void onFailure(Throwable caught) {
         TestSetValidator.rethrowException(caught);
+        fail(caught.getMessage());
       }
 
       public void onSuccess(LogRecord result) {
@@ -106,7 +107,6 @@
         finishTest();
       }
     });
-    finishTest();
   }
 
   private LoggingRPCTestServiceAsync getServiceAsync() {