Commit Graph

4 Commits

Author SHA1 Message Date
Marcono1234 4dda4ec5ba
Use diamond operator when creating generic instances (#2104) 2022-04-17 15:27:21 -07:00
Marcono1234 a92bbf849c
Improve TreeTypeAdapter thread-safety (#1976)
* Improve TreeTypeAdapter thread-safety

Gson claims to be thread-safe so TreeTypeAdapter.delegate() might be
called by multiple threads. To guarantee that each thread sees a fully
constructed `delegate`, the field has to be `volatile`.

* Improve TreeTypeAdapter thread race comment
2021-11-01 15:13:08 -07:00
Eric Cochran 3270e8d972 Remove need for synthetic accessor methods. 2017-04-22 17:32:59 -07:00
Inderjeet Singh 34d7521d95 moved the JsonSerializationContext/JsonDeserializationContext fields to where they are used.
Also moved TreeTypeAdapter to internal.bind package for potential use in JsonAdapterAnnotationFactory.
2016-03-28 14:46:02 -07:00