I'm getting a compiler warning for the @SuppressWarnings
annotation in eclipse for the code:
@Override
public boolean doSomething(@SuppressWarnings("unused") String whatever) throws AnException {
throw new AnException("I'm still in bed and can't do anything until I've had a shower!");
}
It looks like a yellow squiggle under the word "unused" and on mouse hover I get the tooltip Unnecessary @SuppressWarnings("unused")
.
I think another developer is being prompted to put in these annotations by eclipse and I'm basically being prompted to take them out. How can I configure eclipse to prompt me to put the @SuppressWarnings
annotation in instead of it complaining about it?
If anyone would like to comment on best practice here then that would also be most welcome.