Inspectopedia Help

Numeric overflow

Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction .

Examples:

float a = 1.0f/0.0f; long b = 30 * 24 * 60 * 60 * 1000; long c = 1000L << 62;

Inspection options

Option

Type

Default

Ignore << operation which results in negative value

Checkbox

true

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023