No arg constructor vs Type Adapters | Stop using sun.misc.unsafe

Viewed 37

I use gson in my project and i will be moving on to java 17, as this will not allow me to use sun.misc.Unsafe

I will have to explicitly disable jdk unsafe on my gson instances.

I have 100+ data models and many have final fields in it. What should be the preferred way to update my POJOs, should i simply make these fields not final and add a no arg constructor Or should i use some lib or something to add Type Adapter for each different data model that i have.

0 Answers
Related