I have a public abstract class and I'm trying to use the getClass()
method, as I will need info from the class extending my abstract class. An example is this:
public String getName() {
return getClass().getSimpleName();
}
However, IntelliJ reports this:
Ambiguous method call. Both
getClass () in Object and
getClass () in Object match.
The code runs fine, but having tens of error warnings in my IDE is kinda in my way. It disrupts my work flow with a lot of false positives.
Why are these errors shown, and what can I do to not see them?