From 97cc231d62c3121ae7f627f77989057090541ee1 Mon Sep 17 00:00:00 2001 From: Andre Wachsmuth Date: Mon, 23 Oct 2023 22:36:19 +0200 Subject: [PATCH] [okhttp-gson] Make initializer block for GSON builder static #16860 Make initializer block for GSON builder static, see #16860 --- .../src/main/resources/Java/libraries/okhttp-gson/JSON.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/JSON.mustache index d6883b98231f..6cf7ec7898c4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/JSON.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/JSON.mustache @@ -109,7 +109,7 @@ public class JSON { return clazz; } - { + static { GsonBuilder gsonBuilder = createGson(); gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter);