OOP.AHSM
Avoid hiding inherited "static" member methods
Description
This rule flags any inherited "static" method that is hidden by a child class.
Example
package OOP;
public class AHSM {
static void method1 () {}
}
class AHSM_ extends AHSM {
static void method1 () {}
}
Repair
The solution will depend upon the design of the program, but might be as simple as using the inherited method and removing the method declared in the child class.
|