Skip to content

Commit

Permalink
Merge pull request #192 from SentryMan/plugin-fix
Browse files Browse the repository at this point in the history
Fix Recursive Method Call In builder
  • Loading branch information
rob-bygrave authored Nov 30, 2023
2 parents aa70730 + ec18620 commit 2b7096a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jsonb/src/main/java/io/avaje/jsonb/core/DJsonb.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -256,7 +256,7 @@ public Builder mathTypesAsString(boolean mathTypesAsString) {

@Override
public Builder bufferRecycling(BufferRecycleStrategy strategy) {
bufferRecycling(strategy);
this.strategy = strategy;
return this;
}

Expand Down Expand Up @@ -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);
}
}
}

0 comments on commit 2b7096a

Please sign in to comment.