From ffa8c2047e6365732ede002f2153ecc10cfbebc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=9A=E7=94=A8=E8=B4=A6=E5=8F=B7?= Date: Thu, 20 Apr 2023 03:46:21 +0000 Subject: [PATCH] add java.lang.IllegalArgumentException: Comparison method violates its general contract!.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 通用账号 --- ...on: Comparison method violates its general contract!.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 java.lang.IllegalArgumentException: Comparison method violates its general contract!.md diff --git a/java.lang.IllegalArgumentException: Comparison method violates its general contract!.md b/java.lang.IllegalArgumentException: Comparison method violates its general contract!.md new file mode 100644 index 0000000..c2f76c9 --- /dev/null +++ b/java.lang.IllegalArgumentException: Comparison method violates its general contract!.md @@ -0,0 +1,7 @@ +使用 List中的sort方法报错: + +![请添加图片描述](https://img-blog.csdnimg.cn/7446870ddc054b4b953d7ef610a2d711.png) + +解决方法:使用 jdk6中的排序方法 + +**``-Djava.util.Arrays.useLegacyMergeSort=true``** \ No newline at end of file -- Gitee