Friday, July 11, 2025

Re: Using rpc.XserializeFinalFields

Thanks for the responses. The biggest thing, I suppose, is JPMS, especially since Java 17, which I have not yet had a need to learn much about. Am I setting myself up for reflection exceptions in unpredictable places, as suggested at https://docs.oracle.com/en/java/javase/17/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-7BB28E4D-99B3-4078-BDC4-FC24180CE82B and https://github.com/gwtproject/gwt/issues/9793? If so, is there a good workaround? And after digging further, I found a proposal at https://openjdk.org/jeps/8349536 to disallow the final field modification used by the deserializer (https://github.com/gwtproject/gwt/blob/498c127d78e24e0768f50f16afdb0040e4317ea3/user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamReader.java#L851). So maybe this is a bad idea in the long-term unless the deserializer is able to be switched to using ReflectionFactory.

And unfortunately, the DTOs really are quite messy to use with Jackson.

On Friday, July 11, 2025 at 11:08:26 AM UTC-5 Tim Macpherson wrote:
My DTOs had some circular references which were permissable for rpc but not for Jackson.
So far no other problems.
On Thu, Jul 10, 2025 at 7:22 PM, Colin Alworth
If your DTO classes care about specific collection implementations, or want maps with complex keys, or want to serialize non-tree graphs (so the same object can appear more than once when it gets to the client), JSON might add extra hurdles.

The final field serialization feature was added a long time ago, and I don't think I've seen any issues come up since it was first added.  Brian's comment near the end of that ticket still applies - it probably isn't safe to assume for general purpose libraries, but if you own the application as well, it should be safe to use.

On Thursday, July 10, 2025 at 12:21:51 PM UTC-5 tim_mac...@yahoo.co.uk wrote:
I recently migrated from rpc to Domino Jackson. 

If your DTO classes are well formed it's not difficult - so far,  not completely tested 


On Thu, Jul 10, 2025 at 2:54 PM, 'Gerard Keiser' via GWT Users
I noticed there were many warnings about adding the experimental it's not rpc.XserializeFinalFields flag (https://github.com/gwtproject/gwt/issues/1062). Is there anything I should be looking out for if I try this?

(Yes, I would prefer to just use Jackson, but that is a much larger migration effort.)

--
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 google-web-tool...@googlegroups.com.

--
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 google-web-tool...@googlegroups.com.
To view this discussion visit

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/e625b6e7-7f8a-414d-88f3-dfa2e32e0fd7n%40googlegroups.com.

No comments:

Post a Comment