A generic type is a generic class or interface that is parameterized over types. For example, java.util.List
has one type parameter:
the type of its elements.
When generic types are used raw (without type parameters), the compiler is not able to do generic type checking. For this reason, it is sometimes
necessary to cast objects and defer type-checking to runtime.
What is the potential impact?
When a cast fails, a ClassCastException
is thrown and the program most likely crashes. Therefore, this issue might impact the
availability and reliability of your application.