Skip to content

Commit c8e6c2a

Browse files
authored
use _streamReadConstraints where possible (#1307)
1 parent 3161b9d commit c8e6c2a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/main/java/com/fasterxml/jackson/core/base/ParserMinimalBase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ public double getValueAsDouble(double defaultValue) throws IOException
498498
if (_hasTextualNull(str)) {
499499
return 0L;
500500
}
501-
streamReadConstraints().validateFPLength(str.length());
501+
_streamReadConstraints.validateFPLength(str.length());
502502
return NumberInput.parseAsDouble(str, defaultValue);
503503
case ID_NUMBER_INT:
504504
case ID_NUMBER_FLOAT:

src/main/java/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ protected final boolean _loadMore() throws IOException
215215
_currInputProcessed += bufSize;
216216
_currInputRowStart -= bufSize;
217217
// 06-Sep-2023, tatu: [core#1046] Enforce max doc length limit
218-
streamReadConstraints().validateDocumentLength(_currInputProcessed);
218+
_streamReadConstraints.validateDocumentLength(_currInputProcessed);
219219

220220
int count = _inputStream.read(_inputBuffer, 0, space);
221221
if (count > 0) {

src/main/java/com/fasterxml/jackson/core/json/async/NonBlockingByteBufferJsonParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void feedInput(final ByteBuffer byteBuffer) throws IOException {
5757
_currInputProcessed += _origBufferLen;
5858

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

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

src/main/java/com/fasterxml/jackson/core/json/async/NonBlockingJsonParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void feedInput(final byte[] buf, final int start, final int end) throws I
4949
_currInputProcessed += _origBufferLen;
5050

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

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

0 commit comments

Comments
 (0)