From 390385e382473927c4ba2eaf381c709003fd366a Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Sat, 6 Aug 2022 19:01:37 +0200 Subject: [PATCH] Clarify that `GsonBuilder.setExclusionStrategies` does not replace existing ones (#2168) * Clarify that `GsonBuilder.setExclusionStrategies` does not replace existing ones * Fix punctuation --- gson/src/main/java/com/google/gson/GsonBuilder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gson/src/main/java/com/google/gson/GsonBuilder.java b/gson/src/main/java/com/google/gson/GsonBuilder.java index 4c540ac1..9cf2b111 100644 --- a/gson/src/main/java/com/google/gson/GsonBuilder.java +++ b/gson/src/main/java/com/google/gson/GsonBuilder.java @@ -368,6 +368,8 @@ public final class GsonBuilder { * deserialization. Each of the {@code strategies} will be applied as a disjunction rule. * This means that if one of the {@code strategies} suggests that a field (or class) should be * skipped then that field (or object) is skipped during serialization/deserialization. + * The strategies are added to the existing strategies (if any); the existing strategies + * are not replaced. * * @param strategies the set of strategy object to apply during object (de)serialization. * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern