sefasdfasd / google-gson

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

Prevent unused field warnings #418

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I write a Gson class I end up having to annotate the classes with 
@SuppressWarnings("unused") to prevent unused field warnings.

Please eliminate these warnings automatically

Google Guice somehow accomplishes this, so it's definitely possible.  If you 
need pointers about under which scenario Guice supresses warnings, let me know 
and I'll add an example.

Original issue reported on code.google.com by glenview...@gmail.com on 9 Mar 2012 at 7:29

GoogleCodeExporter commented 9 years ago
There isn't much we can do. Your tools might be suppressing warnings on 
annotated fields; Gson doesn't require annotations so that won't apply.

Perhaps you want to explicitly add an @SerializedName annotation?

Original comment by limpbizkit on 18 Mar 2012 at 6:02