fastjson version 1.2.78 Comparison method violates its general contract!

0mkxixxg  于 2021-11-27  发布在  Java
关注(0)|答案(8)|浏览(828)

堆栈信息
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

yruzcnhs

yruzcnhs1#

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

9rbhqvlz

9rbhqvlz4#

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

vfhzx4xs

vfhzx4xs5#

我从1.2.78回滚到1.2.75就好了

tcomlyy6

tcomlyy66#

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

1l5u6lss

1l5u6lss7#

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

vx6bjr1n

vx6bjr1n8#

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

相关问题