Cast to 'long' can be 'long' literal

Last modified: 03 December 2024

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;