Wednesday, January 2, 2013

GWT CustomFieldSerializer Recursivity

I've been trying to work on a custom serializer but I've not been able to get it to work. So I've been investigating com.google.gwt.user.server.rpc.impl.SerializabilityUtil. What I'm seeing is a strange recursive loop that looks odd to me. 

I can register a custom field serializer on next to the class or in the rpc core class and both produce the same result. But for this example I'll show the serializer looks like in the loop in rpc core.

class com.google.gwt.user.client.rpc.core.com.googlecode.objectify.impl.ref.StdRef_CustomFieldSerializer - finds the serializer on this iteration
class com.google.gwt.user.client.rpc.core.com.googlecode.objectify.impl.ref.StdRef_CustomFieldSerializer_CustomFieldSerializer - but on this one it looks for this and sets the mapping in this var to null in this map classServerCustomSerializerCache

During the second time it clears the setting in the cache too, which doesn't make sense to me. During the second time it sets the mapped serializer in this var to null, classServerCustomSerializerCache. Any idea if this is to be expected?

While I see it finds my custom field serializer in the code, I get stumped wondering why the code behaves as it does. Well anyway, my goal is to get the custom field serializer white listed, but I can't seem to get it registered. 

Brandon Donnelson
http://c.gwt-examples.com


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/kZpLkEcYI4kJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment