Sorry. I should have pointed out that I am always using gcj to compile .class files generated by 'javac'. Looks like we are both seeing the bug then. Of course I managed to rewrite the method to do the same thing, but without using the loop etc., however, this is still a bug which should be fixed...