InspectionGadgets: Infinite recursion detection

The following methods is marked as "infinite recursion":

public double calculateOverTimeOverall() {
return calculateOverTime() + getPreviousMonth().calculateOverTimeOverall();

I think it is not a infinite recursion, cause "getPreviousMonth()" returns sometimes a subclass of this class --> overriden method --> no recurive call --> finite recursion...

What do u think?

1 comment

What about the other times when "this" class is returned? In that case, I guess this is a case for 'Infinite Recursion'.


Please sign in to leave a comment.