-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] java.lang.StackOverflowError when method has more then 500 lines of code #2453
Comments
Stacktrace:
The problem is the really long chained method call. As a workaround you can split it up into multiple shorter chains. |
This is the example right?
https://github.com/djogss/lombok-issue/blob/master/src/main/java/com/example/demo/springsecurity/WebSecurityConfig.java
Damn. I can see how someone might arrive at something like that but ..
really, there should be a way to just check a list of id's instead of doing
it the painful way.
Digression aside: I really wonder why lombok tries to parse that whole
thing, the only annotation on there is `@Slf4j` ..
…On Wed, May 6, 2020 at 11:43 PM Rawi01 ***@***.***> wrote:
Stacktrace:
Caused by: java.lang.StackOverflowError
at lombok.javac.JavacAST.buildStatementOrExpression(JavacAST.java:384)
at lombok.javac.JavacAST.buildTree(JavacAST.java:196)
at lombok.javac.JavacAST.buildTree(JavacAST.java:1)
at lombok.core.AST.buildWithField0(AST.java:394)
at lombok.core.AST.buildWithField(AST.java:292)
at lombok.javac.JavacAST.drill(JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression(JavacAST.java:387)
at lombok.javac.JavacAST.buildTree(JavacAST.java:196)
at lombok.javac.JavacAST.buildTree(JavacAST.java:1)
at lombok.core.AST.buildWithField0(AST.java:394)
at lombok.core.AST.buildWithField(AST.java:292)
at lombok.javac.JavacAST.drill(JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression(JavacAST.java:387)
...
The problem is the really long chained method call. As a workaround you
can split it up into multiple shorter chains.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2453 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABIERNL3ZE7MXGCIF46CQLRQHKZ5ANCNFSM4M2IHI6A>
.
--
"Don't only practice your art, but force your way into it's secrets, for it
and knowledge can raise men to the divine."
-- Ludwig von Beethoven
|
Reproduced on linux, with eclipse, on edge and 1.18.12, when doing a gradle clean/build
similar (but not identical) to the one listed by @Rawi01 FxPalettes.java.zip |
I've made an even simpler, minimal, reproduction of the problem, can be used for unit test or something. Just some class that initializes a static field with a long chained call. |
I'm closing all duplicates of #1118 |
Describe the bug
Produce the java.lang.StackOverflowError if codebase contains the method longer than 500 lines
To Reproduce
Please see repository on github with instructions:
https://github.com/djogss/lombok-issue
Expected behavior
Code compiles without any issue
Version info (please complete the following information):
The same happens on java 8 as well.
The text was updated successfully, but these errors were encountered: