diff --git a/jsonb/src/main/java/io/avaje/jsonb/core/DJsonb.java b/jsonb/src/main/java/io/avaje/jsonb/core/DJsonb.java index d8520b9f..1ea41f5b 100644 --- a/jsonb/src/main/java/io/avaje/jsonb/core/DJsonb.java +++ b/jsonb/src/main/java/io/avaje/jsonb/core/DJsonb.java @@ -228,7 +228,7 @@ static final class DBuilder implements Jsonb.Builder { private boolean serializeNulls; private boolean serializeEmpty = true; private JsonStreamAdapter adapter; - private final BufferRecycleStrategy strategy = BufferRecycleStrategy.HYBRID_POOL; + private BufferRecycleStrategy strategy = BufferRecycleStrategy.HYBRID_POOL; @Override public Builder serializeNulls(boolean serializeNulls) { @@ -256,7 +256,7 @@ public Builder mathTypesAsString(boolean mathTypesAsString) { @Override public Builder bufferRecycling(BufferRecycleStrategy strategy) { - bufferRecycling(strategy); + this.strategy = strategy; return this; } @@ -322,9 +322,9 @@ static JsonAdapter.Factory newAdapterFactory(Type type, AdapterBuilder builder) requireNonNull(builder); return (targetType, jsonb) -> simpleMatch(type, targetType) ? builder.build(jsonb).nullSafe() : null; } - } - private static boolean simpleMatch(Type type, Type targetType) { - return Util.typesMatch(type, targetType); + private static boolean simpleMatch(Type type, Type targetType) { + return Util.typesMatch(type, targetType); + } } }