Skip to content

Commit

Permalink
Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
plokhotnyuk committed Jan 12, 2023
1 parent 941d82f commit 7d8e9de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2920,7 +2920,7 @@ final class JsonReader private[jsoniter_scala](
val maxCharBufSize = config.maxCharBufSize
if (charBufLen == maxCharBufSize) tooLongStringError()
charBufLen = (-1 >>> Integer.numberOfLeadingZeros(charBufLen | required)) + 1
if (Integer.compareUnsigned(charBufLen, maxCharBufSize) > 0) charBufLen = maxCharBufSize
if (charBufLen > maxCharBufSize || charBufLen < 0) charBufLen = maxCharBufSize
charBuf = java.util.Arrays.copyOf(charBuf, charBufLen)
charBufLen
}
Expand Down Expand Up @@ -3026,7 +3026,7 @@ final class JsonReader private[jsoniter_scala](
val maxBufSize = config.maxBufSize
if (bufLen == maxBufSize) tooLongInputError()
bufLen <<= 1
if (Integer.compareUnsigned(bufLen, maxBufSize) > 0) bufLen = maxBufSize
if (bufLen > maxBufSize || bufLen < 0) bufLen = maxBufSize
buf = java.util.Arrays.copyOf(buf, bufLen)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3413,7 +3413,7 @@ final class JsonReader private[jsoniter_scala](
val maxCharBufSize = config.maxCharBufSize
if (charBufLen == maxCharBufSize) tooLongStringError()
charBufLen = (-1 >>> Integer.numberOfLeadingZeros(charBufLen | required)) + 1
if (Integer.compareUnsigned(charBufLen, maxCharBufSize) > 0) charBufLen = maxCharBufSize
if (charBufLen > maxCharBufSize || charBufLen < 0) charBufLen = maxCharBufSize
charBuf = java.util.Arrays.copyOf(charBuf, charBufLen)
charBufLen
}
Expand Down Expand Up @@ -3519,7 +3519,7 @@ final class JsonReader private[jsoniter_scala](
val maxBufSize = config.maxBufSize
if (bufLen == maxBufSize) tooLongInputError()
bufLen <<= 1
if (Integer.compareUnsigned(bufLen, maxBufSize) > 0) bufLen = maxBufSize
if (bufLen > maxBufSize || bufLen < 0) bufLen = maxBufSize
buf = java.util.Arrays.copyOf(buf, bufLen)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3410,7 +3410,7 @@ final class JsonReader private[jsoniter_scala](
val maxCharBufSize = config.maxCharBufSize
if (charBufLen == maxCharBufSize) tooLongStringError()
charBufLen = (-1 >>> Integer.numberOfLeadingZeros(charBufLen | required)) + 1
if (Integer.compareUnsigned(charBufLen, maxCharBufSize) > 0) charBufLen = maxCharBufSize
if (charBufLen > maxCharBufSize || charBufLen < 0) charBufLen = maxCharBufSize
charBuf = java.util.Arrays.copyOf(charBuf, charBufLen)
charBufLen
}
Expand Down Expand Up @@ -3516,7 +3516,7 @@ final class JsonReader private[jsoniter_scala](
val maxBufSize = config.maxBufSize
if (bufLen == maxBufSize) tooLongInputError()
bufLen <<= 1
if (Integer.compareUnsigned(bufLen, maxBufSize) > 0) bufLen = maxBufSize
if (bufLen > maxBufSize || bufLen < 0) bufLen = maxBufSize
buf = java.util.Arrays.copyOf(buf, bufLen)
}

Expand Down

0 comments on commit 7d8e9de

Please sign in to comment.