public abstract class InternalJacksonUtil extends Object
| Constructor and Description |
|---|
InternalJacksonUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
addOverflowSafe(int base,
int length)
Internal Use Only.
|
public static int addOverflowSafe(int base,
int length)
Method that will add two non-negative integers, and if result overflows, return
Integer.MAX_VALUE. For performance reasons, does NOT check for
the result being less than Integer.MIN_VALUE, nor whether arguments
are actually non-negative.
This is usually used to implement overflow-safe bounds checking.
Copyright © 2008–2025 FasterXML. All rights reserved.