Inspectopedia
 
2024.3

Suspicious array cast

Warning
New
Last modified: 03 December 2024

Reports suspicious array casts. An array cast is considered suspicious when it casts to a more specific array type. Such a cast is legal at compile time but may fail with a ClassCastException at runtime.

Example: