Usually (although not necessarily) considered unsafe. As you said, a superclass cannot be completely constructed and, therefore, will not be ready to handle all the calls that a subclass can make in its overridden method.
However, in the case where all subclasses simply return a constant that is independent of any other method, then this should be fine. The only drawback is that you cannot guarantee that the subclass will override this method accordingly.
Regarding your last question: this is not an abstract and concrete superclass problem. This is a problem with calling overridden methods in the constructor. Abstraction against the concrete does not matter.
Edit in response to OP comment
I'm not sure what you mean by "polymorphic." A call to a virtual method always invokes a submaximal implementation. The only time an implementation of superclasses is called is the super keyword. For instance:
public class SuperClass { public SuperClass() { System.out.println(getValue()); } public String getValue() { return "superclass"; } public static void main(String[] args) { new SubClass(); } public static class SubClass extends SuperClass { public String getValue() { return "subclass"; } } }
outputs subclass .
And this:
public class SuperClass { public SuperClass() { System.out.println(getValue()); } public String getValue() { return "superclass"; } public static void main(String[] args) { new SubClass(); } public static class SubClass extends SuperClass { public String getValue() { return super.getValue() + " subclass"; } } }
prints superclass subclass
source share