Suspicious underscore in number literal
Reports decimal number literals that use the underscore numeric separator with groups where the number of digits is not three. Such literals may contain a typo.
This inspection will not warn on literals containing two consecutive underscores. It is also allowed to omit underscores in the fractional part of double
and float
literals.
Example: int oneMillion = 1_000_0000;
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SuspiciousLiteralUnderscore- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 242.22892 |
Last modified: 11 September 2024