{"push_id":860040850,"size":3,"distinct_size":1,"ref":"refs/heads/feature/incremental-sync","head":"a56750de7cdc3403f7c4555f79be3cbd693eef16","before":"17b97b91e68f4240a47f8f3707faa2675c366da9","commits":[{"sha":"bf80d8808cfeeb3fc04120589c69208a1f527fc1","author":{"email":"88738d1b57ef82fa25ec77d2e2064f9f91450f56@gmail.com","name":"Fabian Tamp"},"message":"Fix GsonRequest's use of generics.\n\nPreviously, GsonRequest didn't support parameterized types. i.e.\n- `GsonRequest<MyJsonResponse>` worked, but\n- `GsonRequest<MyJsonResponse<OfX>>` didn't.\n\nAs a workaround, there was an `isArray` parameter you could pass to the constructor that, if set to true, would cause the type parameter to be interpreted as an array instead of as the base response type. Gross.\n\nThis change fixes that problem by moving to using `java.lang.reflect.Type` for the constructor parameter and recommending Gson's `TypeToken` paradigm for this use case. Note that passing `MyJsonResponse.class` to the `type` argument still works.\n\nThis change does sacrifice some type-safety, however - `Class<T>` implements `Type`, and so it's entirely possible for code that uses this class to pass the wrong base type for the generic. It would be possible to make this harder by having an overload that accepts `Class<T>`, but unless that parameter was in a different position to the `Type` parameter, this wouldn't achieve much - the `Class<T>` overload would be used _unless_ the wrong class was specified, in which case the wrong class parameter would be interpreted as as `Type`. I didn't think that the extra complication was worth creating an extra overload for, but I'm definitely open to ideas here :)","distinct":false,"url":"https://api.github.com/repos/projectbuendia/client/commits/bf80d8808cfeeb3fc04120589c69208a1f527fc1"},{"sha":"9d08ead93109f84101dac9a9569d83136a376c2a","author":{"email":"88738d1b57ef82fa25ec77d2e2064f9f91450f56@gmail.com","name":"Fabian Tamp"},"message":"Merge pull request #131 from capnfabs/cleanup/gsonrequest-proper-generics\n\nFix GsonRequest's use of generics.","distinct":false,"url":"https://api.github.com/repos/projectbuendia/client/commits/9d08ead93109f84101dac9a9569d83136a376c2a"},{"sha":"a56750de7cdc3403f7c4555f79be3cbd693eef16","author":{"email":"88738d1b57ef82fa25ec77d2e2064f9f91450f56@gmail.com","name":"Fabian Tamp"},"message":"Merge branch 'dev' into feature/incremental-sync\n\nConflicts:\n\tapp/src/main/java/org/projectbuendia/client/net/OpenMrsChartServer.java\n\nAlso had to manually edit app/src/main/java/org/projectbuendia/client/net/OpenMrsServer.java,\nbecause it uses a `GsonRequest` on the branch that wasn't in use in `dev`.","distinct":true,"url":"https://api.github.com/repos/projectbuendia/client/commits/a56750de7cdc3403f7c4555f79be3cbd693eef16"}]}