Top Description Constructors Methods
com.fasterxml.jackson.core.util

public abstract Class InternalJacksonUtil

extends Object
Class Inheritance

Internal Use Only. Helper class used to contain some useful utility methods.
Since
2.17.3 / 2.18.1

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static int
addOverflowSafe(final int base, final int length)

Internal Use Only.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InternalJacksonUtilback to summary
public InternalJacksonUtil()

Method Detail

addOverflowSafeback to summary
public static int addOverflowSafe(final int base, final int length)

Internal Use Only.

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.