Type parameter extends 'final' class
Reports type parameters declared to extend a final
class.
Suggests replacing the type parameter with the type of the specified final
class since final
classes cannot be extended.
Example:
void foo() {
List<? extends Integer> list; // Warning: the Integer class is a final class
}
After the quick-fix is applied:
void foo() {
List<Integer> list;
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023