discomarathon / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Should not look into excluded (e.g. transient) fields for type information #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a class with generic transient field; such as:
class ImGeneric<T> {
  transient T dontLookAtMe;
}
2. try to serialize (or deserialize) with default settings

What is the expected output? What do you see instead?
exception from thrown from TypeInfoFactory.java:97 - Expecting parameterized 
type, got class 
ImGeneric.
 Are you missing the use of TypeToken idiom?
 See http://sites.google.com/site/gson/gson-user-guide#TOC-Serializing-and-Deserializing-
Gener

What version of the product are you using? On what operating system?
gson 1.4 on OSX Leopard 10.5.7

Please provide any additional information below.
attached you'll find the patch and unit test for this issue

Original issue reported on code.google.com by zregv...@gmail.com on 31 May 2009 at 12:46

Attachments:

GoogleCodeExporter commented 9 years ago
This is a valid bug and thanks for the patch. It is now fixed in r429.

Original comment by inder123 on 2 Jun 2009 at 6:02