ion-java icon indicating copy to clipboard operation
ion-java copied to clipboard

Improve IonBufferConfiguration builder

Open tgregg opened this issue 1 year ago • 0 comments

          > 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

tgregg avatar Sep 20 '23 00:09 tgregg