From 4ebc2c744b7391f654339fcbd12833ffacbf6ba5 Mon Sep 17 00:00:00 2001 From: Mike Friesen Date: Sun, 17 Nov 2024 09:43:36 -0600 Subject: [PATCH] Fixed formatting violations --- .../gson/functional/NamingPolicyTest.java | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/gson/src/test/java/com/google/gson/functional/NamingPolicyTest.java b/gson/src/test/java/com/google/gson/functional/NamingPolicyTest.java index a9a705befe..d41ed6a831 100644 --- a/gson/src/test/java/com/google/gson/functional/NamingPolicyTest.java +++ b/gson/src/test/java/com/google/gson/functional/NamingPolicyTest.java @@ -240,18 +240,22 @@ public void testAtSignInSerializedName() { @Test public void testGsonWithAlternateNamesDeserialiation() { - Gson gson = builder.setFieldNamingStrategy(new FieldNamingStrategy() { - - @Override - public String translateName(Field f) { - return "badname"; - } - - @Override - public List translateToAlternateNames(Field f) { - return List.of("SomeConstantStringInstanceField"); - } - }).create(); + Gson gson = + builder + .setFieldNamingStrategy( + new FieldNamingStrategy() { + + @Override + public String translateName(Field f) { + return "badname"; + } + + @Override + public List translateToAlternateNames(Field f) { + return List.of("SomeConstantStringInstanceField"); + } + }) + .create(); String target = "{\"SomeConstantStringInstanceField\":\"someValue\"}"; StringWrapper deserializedObject = gson.fromJson(target, StringWrapper.class); assertThat(deserializedObject.someConstantStringInstanceField).isEqualTo("someValue");