I was looking through an old codebase and I found a method that only calls its parent:
@Override
public void select(Object item) {
super.select(item);
}
Would there be any use case for such a method? For me it looks like I could just remove it.
Removing it would make almost no difference. You will see a difference when using reflection and looking for the select
method on the object. If you ask tell reflection not to look in the object's base class, it's not going to find the method after you delete it.
Yes, this method can be removed without changing the logic of your code.
Perhaps it used to have a different implementation which was removed, or was supposed to have a different implementation which was never written.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With