It didn't catch it because strictly its not a compilation error. Writing this:
Is synonomous with writing:
In English what your code is saying is "If a equals b, do nothing". Curly brackets define limits of blocks of code in Java. What defines what that block represents is the keyword used when the block is opened (try, catch, do, for, if etc.) If you don't define one, then the only effect they have is on the scope of valiables. For example:
is pretty much the same as:
However, brackets do make this possible:
because the scope of a is limited to what's in the brackets.