W dniu 21.08.2017 o 02:05, Thomas Broyer pisze:
On Monday, August 21, 2017 at 1:13:42 AM UTC+2, Łukasz Bączek wrote:
W dniu 21.08.2017 o 00:27, Thomas Broyer pisze:
>
> Like in any Java environment, as long as you only use the part
of the
> API that's emulated in GWT:
>
http://www.gwtproject.org/doc/latest/RefJreEmulation.html#Package_java_math
<http://www.gwtproject.org/doc/latest/RefJreEmulation.html#Package_java_math>
>
Yes, it just does not work
com.google.gwt.user.client.rpc.SerializationException: Type
'java.math.BigInteger' was not included in the set of types which
can be
serialized by this SerializationPolicy or its Class object could
not be
loaded. For security purposes, this type will not be serialized.:
instance = 123
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:667)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130)
at
com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java:53)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize(HashMap_CustomFieldSerializer.java:39)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serializeInstance(HashMap_CustomFieldSerializer.java:51)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serializeInstance(HashMap_CustomFieldSerializer.java:28)
Oh, so this is about use with GWT-RPC then, not BigInteger by itself.
It's supposed to work too though; tested
here: https://github.com/gwtproject/gwt/blob/2.8.1/user/test/com/google/gwt/user/client/rpc/ValueTypesTest.java
Can you show your code that fails?
Hello,
The information helped me:
Make sure your generics at least implement some interface and you'll be
good to go;
the compiler then sees the classes that need to be on the whitelist, as
they are referenced
in the RPC method (references via this interface)
(e.g. instead of HashMap<String,Object>, use HashMap<String,MyInterface>)
Found here: https://github.com/gwtproject/gwt/issues/5810
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.