Revision: 10556
Author: [email protected]
Date: Thu Aug 18 10:35:36 2011
Log: 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: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=10556
Modified:
/trunk/user/src/com/google/gwt/user/server/rpc/core/java/util/logging/LogRecord_ServerCustomFieldSerializer.java
/trunk/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java
=======================================
---
/trunk/user/src/com/google/gwt/user/server/rpc/core/java/util/logging/LogRecord_ServerCustomFieldSerializer.java
Thu Aug 11 05:40:27 2011
+++
/trunk/user/src/com/google/gwt/user/server/rpc/core/java/util/logging/LogRecord_ServerCustomFieldSerializer.java
Thu Aug 18 10:35:36 2011
@@ -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);
}
=======================================
--- /trunk/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java Wed
Jun 1 11:09:25 2011
+++ /trunk/user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java Thu
Aug 18 10:35:36 2011
@@ -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() {
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors