I'm developing an Android library and I wanted to clean all warnings. Most of them is due to unused methods. I don't want to remove this methods from the class as it could be used by other developer.
Should I:
@SuppressWarnings("unused")
on methods or class?If I annotate the class to suppress this warnings it will solve the issue but it will also prevent me for removing real unused methods.
Unused warning should only appear if a private method is never used. If a private method is never used, it is indeed dead code, since nobody could call it from outside. You should delete these methods. I hope you are using a version control system, so you can still find methods in the repository history.
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