A: Around 568 (But sometimes it could be compile)
BeanWithSoManyFields.java · GitHub
This class causes java.lang.StackOverflowError like this:
java.lang.StackOverflowError
at java.lang.reflect.Field.get(Field.java:393)
at lombok.core.AST.buildWithField0(AST.java:383)
at lombok.core.AST.buildWithField(AST.java:284)
at lombok.javac.JavacAST.drill(JavacAST.java:357)
at lombok.javac.JavacAST.buildStatementOrExpression(JavacAST.java:323)
at lombok.javac.JavacAST.buildTree(JavacAST.java:183)
at lombok.javac.JavacAST.buildTree(JavacAST.java:66)
at lombok.core.AST.buildWithField0(AST.java:386)
at lombok.core.AST.buildWithField(AST.java:284)
at lombok.javac.JavacAST.drill(JavacAST.java:357)
You can compile this class with
javac BeanWithSoManyFields.java -classpath c:\opt\pleiades\eclipse\lombok.jarif you had removed a field.You can also increase the stack size of
javacwith-J-Xssoption likejavac BeanWithSoManyFields.java -J-Xss1025K -classpath c:\opt\pleiades\eclipse\lombok.jar.@EqualsAndHashCode,@Getter, and@Setterdo not causeStackOverflowErrorwith this source.Compiler embedded in Eclipse (ECJ) does not cause
StackOverflowErrorwith this source.