This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 9fb8d6cb6fb1e90e11cccb233fcf074fae2ea04b Author: walter <[email protected]> AuthorDate: Wed Jul 3 21:55:20 2024 +0800 [fix](gson) Fix GSON pretty printting setting (#37211) --- fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java b/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java index 7e49fd4e96e..9f365808a6f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java +++ b/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java @@ -636,11 +636,12 @@ public class GsonUtils { } }); - private static final GsonBuilder GSON_BUILDER_PRETTY_PRINTING = GSON_BUILDER.setPrettyPrinting(); // this instance is thread-safe. public static final Gson GSON = GSON_BUILDER.create(); + // ATTN: the order between creating GSON and GSON_PRETTY_PRINTING is very important. + private static final GsonBuilder GSON_BUILDER_PRETTY_PRINTING = GSON_BUILDER; public static final Gson GSON_PRETTY_PRINTING = GSON_BUILDER_PRETTY_PRINTING.create(); /* --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
