At the end i got it almost working: 1. i have my serialization policy that whitelists java.util.Collections $xxx classes 2. and i also have in my project a class called com.google.gwt.user.client.rpc.core.java.util.Collections with an internal class EmptyList_CustomFieldSerializer which is even found and actually used to serialize the EmptyList on the server-side
but the deserialization on the client-side fails in this method: com.google.gwt.user.client.rpc.impl.SerializerBase#check which seems to be the client-side implementation of the serialization policy's whitelist i was thinking to extend the TypeSerializerCreator but it is hard wired the same as the ProxyCreator :( any idea on how to continue without patching GWT? thanks Michael On Apr 12, 11:19 am, mmoossen <[email protected]> wrote: > well, i created my own serialization policy facade that does whitelist > the unmodifiable collection classes, but then i failed to create a > custom serializer since for that i would need to create a class called > java.util.Collections overwriting the one of the JVM which i feel is > not the best idea... > so i think i need to patch a bit the > SerializabilityUtil#hasCustomFieldSerializer method... which does not > look to be much work... > > and then i would be able to serialize unmodifiable collections :) > at least from the server to the client, because on the client side the > serialization policy seems to be hard wired during compilation time... > (any idea on how to whitelist something on the client?) > but actually i only care of that direction... ;) > > all this would be just a piece of cake with this > fixed:http://code.google.com/p/google-web-toolkit/issues/detail?id=4843 > > i will keep you informed on my progress > Michael > > On Apr 12, 9:43 am, mmoossen <[email protected]> wrote: > > > Dear all! > > > currently i am not able to serialize unmodifiable collections getting > > some exception because the class signature can not found in the > > serialization policy file. > > > so i thought let's just create a dummy RPC method explicitely > > declaring Collections.EmptyList and co. as parameters to tell the GWT > > compiler that i really need those classes... when i saw that all those > > class definitions are private, and i started to really understand the > > problem... > > > but i still would really like to be able to serialize those classes, i > > mean that the classes are private is no problem when using a custom > > serializer, the only thing i need is to create the class signature > > into the serialization policy file, or to be able to skip the class > > signature check for certain classes like these. > > > so now i will investigate those possibilities... > > > meanwhile, has anybody maybe a better idea or any suggestion on how to > > achieve this? > > > thanks > > Michael -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
