I am aware that finalizers in Java have serious performance issues - see this thread for details: Why do finalizers have a "severe performance penalty"?
Now I have a scenario where I want to prohibit subclasses of a certain class from having finalizers. AfaIk, this can be done via adding a final empty finalizer:
protected final void finalize() throws Throwable {}
Would such an empty finalizer already trigger the known performance issues? Or would the GC detect it as an empty finalizer and treat objects like ordinary non-finalizable objects?
Reason for this is a framework that uses its own, controlled finalization process. Users implementing subclasses of the mentioned class could break this process by adding their own Java finalizers. Additionally it would force them to use the intended finalization process if finalization is needed at all.