fix regression in Java compiler