My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 68: Gson can not recognize transient modifier
1 person starred this issue and may be notified of changes. Back to list
 
Project Member Reported by hussain.mutawa, Sep 24, 2011
What steps will reproduce the problem?
1. when an object is declared as transient, Gson can not observe it.
2. an object that has transient variables, even PUBLIC are hidden
3. converting from json to object with transient variables will give a none initialized object

What is the expected output? What do you see instead?
transient variables if declared public should be treated the same as default modifier

What version of the product are you using? On what operating system?
java 1.6 / tomcat 7

Please provide any additional information below.
please email me if you need extra information. I had to remove the transient modifier to get the library working. which solved the problem. My knowledge of transient is that a modifier that informs JVM not to invoke the variable if it is in the cache memory which improves the response time as compared with volatile which forces the JVM to invoke the variable from the main memory regardless of being updated by another thread or not. Please correct me if I am wrong.



Powered by Google Project Hosting