Jtest logo




Contents  Previous  Next  Index

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.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft