commit | 2541e658f70bc9928b573c33168075786c7fef2f | [log] [tgz] |
---|---|---|
author | Inderjeet Singh <inder123@gmail.com> | Thu Sep 29 22:15:37 2011 +0000 |
committer | Inderjeet Singh <inder123@gmail.com> | Thu Sep 29 22:15:37 2011 +0000 |
tree | 2257f99baff8bce8202a65f677739362967f5d07 | |
parent | 8b21c7770b85dae64fa6da181546a73378158a13 [diff] |
Fixed com.google.gson.functional.VersioningTest.testIgnoreLaterVersionClassDeserialization by changing Gson behavior incompatibly (but more consistent). GSON 1.x applies different rules for versioning for classes vs fields. So, if you deserialize a JSON into a field that is supposed to be skipped, the field is set to null (or default value). However, if you deserialize it to a top-level class, a default instance is returned. GSON 2.x returns null for the top-level class.