Changeset 5977 in josm for trunk/src


Ignore:
Timestamp:
2013-05-29T01:27:07+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8712 - workaround to "Comparison method violates its general contract" when sorting a collection in Java 7, disabled for local builds. Set new property jdk.Arrays.useLegacyMergeSort to true to enable the workaround for local builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r5900 r5977  
    13441344            // Ignore all exceptions
    13451345        }
     1346        // Workaround to fix another Java bug
     1347        // Force Java 7 to use old sorting algorithm of Arrays.sort (fix #8712).
     1348        // See Oracle bug database: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7075600
     1349        // and http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6923200
     1350        if (Main.pref.getBoolean("jdk.Arrays.useLegacyMergeSort", !Version.getInstance().isLocalBuild())) {
     1351            updateSystemProperty("java.util.Arrays.useLegacyMergeSort", "true");
     1352        }
    13461353    }
    13471354   
Note: See TracChangeset for help on using the changeset viewer.