Cast to 'long' can be 'long' literal
Reports int
literal expressions that are immediately cast to long
.
Such literal expressions can be replaced with equivalent long
literals.
Example:
Long l = (long)42;
After the quick-fix is applied:
Long l = 42L;
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023