Jumpin’ Javac

A colleague suggested not using jikes when he heard about my problem, but I wasn’t using jikes ….

I have a simple class hierarchy of three classes:

USNormalizer extends Normalizer
USValueFactory extends USNormalizer

I have a method normalize in the class Normalizer which is not overwritten by any of the other classes and it is public.

public String normalize(String input);

So one of my methods in USValueFactory calls the normalize method. But the execution never gets there. I put in a log statement before the call of ‘normalize’ and it was written to the logfile and the log statement which I put before the first line of the ‘normalize’ method was never never written to the logfile. This really puzzled me. (And still does).

My colleague suggested using the debugger to find out what was going on. Now that I know what is going on I am more confused than before. What happens is: the stupid programm jumps to an entirely different method in the Normalizer class one that is called ‘normalizeField(…)’. Now please someone help me and explain.

I am really curious what kind of bug this is. I am pretty sure it was going on all the time and I just did not notice because before I was implementing this branch of my class tree it did not matter. But for the US version I overwrote one of the methods the ‘normalize’ method calls.

Did I mention that I am not getting anywhere with this project currently?

ADDENDUM (12:32) the source of my error has been found. A simple dependency in my ant-file was missing therefore the jar for the core-project wasn’t being re-compiled after I made some changes et voilà, disaster ensued. Just cost me about 3 hours or so of work. And I have encountered this problem several times before …..