just beware that Long.compare is Java 1.7 only, you might want to use Longs.compare from Guava instead when merging to 1.x