I'm wondering if I compile in Java 6, but someone runs the program on Java 7, will the Java 6 or 7 version of Arrays.sort be used?
It's important because the new mergesort throws an IllegalArgumentException, and the old one doesn't (see Comparison method violates its general contract! Java 7 only)
Now, it's possible to compile in Java 7 using Arrays.useLegacyMergeSort, but obviously that flag isn't available for Java 6 - and we want to be compatible on Mac OS Snow Leopard (which uses 6).
For some reason (see http://madbean.com/2006/target14/) the -target compiler flag doesn't seem to produce compatible code, so we'd rather compile in Java 6.
Any suggestions?