Avoid Long.compare(x,y) since it's JDK7+