Your observation makes sense, and I appreciate you bringing it to our attention.
I’ve investigated this behavior and found that the rule is actually working as intended. Our aim is to ensure that a method is explicitly designed for overriding. To achieve this, we require the presence of a @param Javadoc description for the parameter. This is documented in the Exceptions section of the rule description (RSPEC).
I’ve verified that the following code snippet will suppress the warning:
/**
* @param someParameter designed for overriding
*/
protected boolean someFunction(String someParameter)
I suppose that makes sense but documenting the parameter as being used does feel like just suppressing a warning. What if the parameter isn’t actually used anymore by any of the overriding classes? It’ll never get cleaned up
That’s a valid observation. It’s impossible to know definitively if a method is overridden. Especially with libraries, its usage might be in another JAR. What we have here is a heuristic, which checks if a method looks like it’s designed for overriding.