ion-java
ion-java copied to clipboard
Improve IonBufferConfiguration builder
> If a maximum buffer size is configured, a handler must also be configured.
We should the things that must go together in the interface then, e.g.
public final BuilderType withMaximumBufferSize(
final int maximumBufferSizeInBytes,
final OversizedValueHandler onOversizedValue,
final OversizedSymbolTableHandler onOversizedSymbolTable
/* ... anything else? */);
If that grows unwieldy or confusing there's always the option of creating a stepped builder.
Originally posted by @jobarr-amzn in https://github.com/amazon-ion/ion-java/pull/503#discussion_r1283861816