GCJ does not reject the following invalid code: public class NullTest { public static void main (String[] args) { int index = 1; if (index == null) index++; } }
Hmm interesting we even produce valid bytecode with the source, maybe we are converting into the correct type which is why this is accepted.
Fixed by my patch for PR java/19070