In Android, I create an abstract class that extends View
(an Android class that I don't have access to). Abstract class overrides views
@Override protected final void onDraw(Canvas canvas) { if(conditions) return;
however, I added the last keyword here.
The fact is that I am creating an abstract method that is supposed to use subclasses instead of onDraw. Therefore, I prevent overriding onDraw further and works.
I know that there are projects to make it better, however it works like a charm without big changes. My question is bigger in the general case if, when doing the above, there are undesirable side effects at runtime or other problems ?!
source share