Skip to content

Commit

Permalink
use _streamReadConstraints where possible (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Jun 13, 2024
1 parent 3161b9d commit c8e6c2a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ public double getValueAsDouble(double defaultValue) throws IOException
if (_hasTextualNull(str)) {
return 0L;
}
streamReadConstraints().validateFPLength(str.length());
_streamReadConstraints.validateFPLength(str.length());
return NumberInput.parseAsDouble(str, defaultValue);
case ID_NUMBER_INT:
case ID_NUMBER_FLOAT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ protected final boolean _loadMore() throws IOException
_currInputProcessed += bufSize;
_currInputRowStart -= bufSize;
// 06-Sep-2023, tatu: [core#1046] Enforce max doc length limit
streamReadConstraints().validateDocumentLength(_currInputProcessed);
_streamReadConstraints.validateDocumentLength(_currInputProcessed);

int count = _inputStream.read(_inputBuffer, 0, space);
if (count > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void feedInput(final ByteBuffer byteBuffer) throws IOException {
_currInputProcessed += _origBufferLen;

// 06-Sep-2023, tatu: [core#1046] Enforce max doc length limit
streamReadConstraints().validateDocumentLength(_currInputProcessed);
_streamReadConstraints.validateDocumentLength(_currInputProcessed);

// Also need to adjust row start, to work as if it extended into the past wrt new buffer
_currInputRowStart = start - (_inputEnd - _currInputRowStart);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void feedInput(final byte[] buf, final int start, final int end) throws I
_currInputProcessed += _origBufferLen;

// 06-Sep-2023, tatu: [core#1046] Enforce max doc length limit
streamReadConstraints().validateDocumentLength(_currInputProcessed);
_streamReadConstraints.validateDocumentLength(_currInputProcessed);

// Also need to adjust row start, to work as if it extended into the past wrt new buffer
_currInputRowStart = start - (_inputEnd - _currInputRowStart);
Expand Down

0 comments on commit c8e6c2a

Please sign in to comment.