#8526 Incorrect error with generics inheritance
I came across this in some legacy code. I have a feeling something like this has come up before, but it appears very simple:
This is because JTable declares and implements the method as returning a genericized Class:
getColumnClass(int columnIndex);]]>
The error goes away if Table.getColumnClass(..) is changed to return the genericized Class:
getColumnClass(int columnIndex);
}
class Bar extends JTable implements Table { <--- No Error
}]]>The code will compile and run correctly either way, so this should be a warning rather than an error.
Please sign in to leave a comment.