Skip to content

Commit 2b7096a

Browse files
authored
Merge pull request #192 from SentryMan/plugin-fix
Fix Recursive Method Call In builder
2 parents aa70730 + ec18620 commit 2b7096a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

jsonb/src/main/java/io/avaje/jsonb/core/DJsonb.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static final class DBuilder implements Jsonb.Builder {
228228
private boolean serializeNulls;
229229
private boolean serializeEmpty = true;
230230
private JsonStreamAdapter adapter;
231-
private final BufferRecycleStrategy strategy = BufferRecycleStrategy.HYBRID_POOL;
231+
private BufferRecycleStrategy strategy = BufferRecycleStrategy.HYBRID_POOL;
232232

233233
@Override
234234
public Builder serializeNulls(boolean serializeNulls) {
@@ -256,7 +256,7 @@ public Builder mathTypesAsString(boolean mathTypesAsString) {
256256

257257
@Override
258258
public Builder bufferRecycling(BufferRecycleStrategy strategy) {
259-
bufferRecycling(strategy);
259+
this.strategy = strategy;
260260
return this;
261261
}
262262

@@ -322,9 +322,9 @@ static JsonAdapter.Factory newAdapterFactory(Type type, AdapterBuilder builder)
322322
requireNonNull(builder);
323323
return (targetType, jsonb) -> simpleMatch(type, targetType) ? builder.build(jsonb).nullSafe() : null;
324324
}
325-
}
326325

327-
private static boolean simpleMatch(Type type, Type targetType) {
328-
return Util.typesMatch(type, targetType);
326+
private static boolean simpleMatch(Type type, Type targetType) {
327+
return Util.typesMatch(type, targetType);
328+
}
329329
}
330330
}

0 commit comments

Comments
 (0)