I assume that the compiler is not smart enough to realize that there are no codes around the loops.
If this is real code, simplify it to
return (a == 186 && b == 133);
If this is not real code, maybe there is another way that does not return (if you insert an error), or there is actually a compiler error or restriction. At some point, the problem of stopping will bite you, and the code is too complicated for the compiler to understand.
In the latter case, I would put
throw new RuntimeException( String.format("should never get here (a = %d, b = %d) !",a,b));
in the last statement.
This makes both compilers happy and does not introduce a return value of "undefined" for a case that should never happen, or if it does, I did not think.
Thilo source share