Avoid using Integer.compare() because it is supported since Java 7
Merge pull request #132 from myui/hotfixes

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