I'm having this runtime exception when trying to do something like:
token = new Gson().fromJson(new String(plainTextTokenBytes, HTTP.UTF_8), ACCESS_TOKEN_TYPE);
Token type:
ACCESS_TOKEN_TYPE = new TypeToken<Quadruple<String, String, Integer, CookieManager>>() {}.getType();
Quadruple class:
public class Quadruple<A, B, C, D> implements Serializable {
    private static final long serialVersionUID = -7513162603404965940L;
    private A first;
    private B second;
    private C third;
    private D fourth;
    public Quadruple(A first, B second, C third, D fourth) {
        this.first = first;
        this.second = second;
        this.third = third;
        this.fourth = fourth;
    }
    ...
}
CookieManager developer docs.
This only happens in Lollipop 5.1.0, I've tested in 5.0.2, 5.0.0 and lower and it works just fine... what could it be? I guess I'm going to open an Google issue report.
Thanks.