-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]使用JSON.toJSONString时导致StackOverflowError #597
Comments
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.11-SNAPSHOT/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
使用JSON.toJSONString打印对象时导致StackOverflowError
环境信息
重现步骤
打印类:
@slf4j
@DaTa
测试类:
打印方法:
期待的正确结果
期待不要报错
相关日志输出
Exception in thread "main" java.lang.StackOverflowError
at java.lang.Class.getEnclosingMethodInfo(Class.java:1072)
at java.lang.Class.getEnclosingClass(Class.java:1272)
at sun.reflect.annotation.AnnotatedTypeFactory.addNesting(AnnotatedTypeFactory.java:96)
at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
at sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedTypes(TypeAnnotationParser.java:137)
at java.lang.reflect.Executable.getAnnotatedParameterTypes(Executable.java:688)
at java.lang.reflect.Parameter.getAnnotatedType(Parameter.java:237)
at com.alibaba.fastjson2.writer.ObjectWriter_3.write(Unknown Source)
at com.alibaba.fastjson2.writer.ObjectWriterArray.write(ObjectWriterArray.java:85)
at com.alibaba.fastjson2.writer.ObjectWriter_2.write(Unknown Source)
at com.alibaba.fastjson2.writer.ObjectWriter_3.write(Unknown Source)
The text was updated successfully, but these errors were encountered: