首页 > 代码库 > Java 异常解决之java.lang.IllegalArgumentException: Comparison method violates its general contract!

Java 异常解决之java.lang.IllegalArgumentException: Comparison method violates its general contract!

Java 异常解决

在你的代码前加一句

    System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");  

我也不知道什么原理,可是攻克了!!!哈哈

Java 异常解决之java.lang.IllegalArgumentException: Comparison method violates its general contract!