From e430a3d181e63d1efac05164bf52ec0466af12b7 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Sun, 20 Oct 2024 18:41:34 +0200 Subject: [PATCH] Use better names for lambda parameters in tests (#2770) --- .../com/google/gson/functional/CustomTypeAdaptersTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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);