Comment on: I have a problem with some Java code
if x == y and y == z then x will be == to z, I think that's redundant. I don't think that would effect the problem however. I would setup a System.out.println() to see what the values are so you can determine why the logic is failing.
did you resolve the problem?