Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/amazon/ion/BufferConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ protected BufferConfiguration(Builder<Configuration, ?> builder) {
/**
* Requires that the maximum buffer size not be limited.
*/
protected void requireMaximumBufferSize() {
private void requireMaximumBufferSize() {
if (maximumBufferSize < _Private_IonConstants.ARRAY_MAXIMUM_SIZE) {
throw new IllegalArgumentException(
"Must specify an OversizedValueHandler when a custom maximum buffer size is specified."
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/com/amazon/ion/IonBufferConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

package com.amazon.ion;

import com.amazon.ion.impl._Private_IonConstants;

/**
* Configures buffers that hold Ion data.
*/
Expand Down Expand Up @@ -185,6 +187,17 @@ private IonBufferConfiguration(Builder builder) {
}
}

/**
* Requires that the maximum buffer size not be limited.
*/
private void requireMaximumBufferSize() {
if (getMaximumBufferSize() < _Private_IonConstants.ARRAY_MAXIMUM_SIZE) {
throw new IllegalArgumentException(
"Must specify both an OversizedValueHandler and OversizedSymbolTableHandler when a custom maximum buffer size is specified."
);
}
}

/**
* @return the handler that will be notified when oversized symbol tables are encountered.
*/
Expand Down
Loading