alibaba / fastjson

FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
https://github.com/alibaba/fastjson2/wiki/fastjson_1_upgrade_cn
Apache License 2.0
25.75k stars 6.5k forks source link

fastjson version 1.2.78 Comparison method violates its general contract! #3868

Open Junior233 opened 3 years ago

Junior233 commented 3 years ago

堆栈信息 Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(TimSort.java:899) ~[na:1.8.0_291] at java.util.TimSort.mergeAt(TimSort.java:516) ~[na:1.8.0_291] at java.util.TimSort.mergeForceCollapse(TimSort.java:457) ~[na:1.8.0_291] at java.util.TimSort.sort(TimSort.java:254) ~[na:1.8.0_291] at java.util.Arrays.sort(Arrays.java:1438) ~[na:1.8.0_291] at com.alibaba.fastjson.util.TypeUtils.computeGetters(TypeUtils.java:1880) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.util.TypeUtils.buildBeanInfo(TypeUtils.java:1820) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:113) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:821) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:440) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.serializer.JSONSerializer.getObjectWriter(JSONSerializer.java:448) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.serializer.ListSerializer.write(ListSerializer.java:76) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.serializer.FieldSerializer.writeValue(FieldSerializer.java:318) ~[fastjson-1.2.78.jar:na] at com.alibaba.fastjson.serializer.JavaBeanSerializer.write(JavaBeanSerializer.java:472) ~[fastjson-1.2.78.jar:na] ... 97 common frames omitted

zhengxinzao commented 3 years ago

我也出现了,应该是 父子类 中有 同名的字段

subenkun commented 3 years ago

+1

SilentChan2 commented 3 years ago

亟待解决

runninckp commented 3 years ago

一樣一樣,幫忙解決一下吧

ypzhuang commented 3 years ago

我从1.2.78回滚到1.2.75就好了

ypzhuang commented 3 years ago

1.2.76也是好的,1.2.77就出现这个问题

creky commented 3 years ago

1.2.78也出现了此问题,合并一下Junior233:patch-1 的pull request吧!

gwself commented 3 years ago

1.2.78一样出现了,序列化QueryWrapper mybatisplus 的查询类时会出现