Avoid using Integer.compare() because it is supported since Java 7