diff --git a/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java b/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java index cce0107f0f..5a4371813a 100644 --- a/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java +++ b/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java @@ -236,7 +236,9 @@ public void testCustomSerializerInvokedForPrimitives() { Gson gson = new GsonBuilder() .registerTypeAdapter( - boolean.class, (JsonSerializer) (s, t, c) -> new JsonPrimitive(s ? 1 : 0)) + boolean.class, + (JsonSerializer) + (value, type, context) -> new JsonPrimitive(value ? 1 : 0)) .create(); assertThat(gson.toJson(true, boolean.class)).isEqualTo("1"); assertThat(gson.toJson(true, Boolean.class)).isEqualTo("true"); @@ -248,7 +250,7 @@ public void testCustomDeserializerInvokedForPrimitives() { new GsonBuilder() .registerTypeAdapter( boolean.class, - (JsonDeserializer) (json, t, context) -> json.getAsInt() != 0) + (JsonDeserializer) (json, type, context) -> json.getAsInt() != 0) .create(); assertThat(gson.fromJson("1", boolean.class)).isEqualTo(Boolean.TRUE); assertThat(gson.fromJson("true", Boolean.class)).isEqualTo(Boolean.TRUE);