Fix wrong error syntax.
Adapt several rules to Java 5.