Back to Intellij Community

NumericOverflow

java/java-impl/resources/inspectionDescriptions/NumericOverflow.html

2025.3-rc-2301 B
Original Source

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;