Bug 541103

Summary: [content assist] Invalid lambda syntax causes Eclipse to hang indefinitely
Product: [Eclipse Project] JDT Reporter: Helo Spark <helospark>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: gayanper, mauromol, stephan.herrmann
Version: 4.9   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=539685
Whiteboard: stalebug

Description Helo Spark CLA 2018-11-13 12:30:44 EST
Reproduction steps:

Create a class and enter the following content (note, annotation can be anything):

@JavaBean(data -> {
  data.
})
public class Main() {

}

Ask for competition after "data.", note that Eclipse never response, UI becomes unresponsive, one CPU core is at 100%.

Expected:

While the syntax is invalid as of Java 11, Eclipse should not enter into an infinite loop.

Dev notes:

Infinite loop is at "org.eclipse.jdt.internal.compiler.parser.Parser:11556"

ProcessTerminals : for (;;) {

resumeOnSyntaxError() call always returns "RESTART" which causes the parser to jump back to ProcessTerminals.
Comment 1 Stephan Herrmann CLA 2018-11-14 18:46:49 EST
Thanks for the example, likely duplicate of bug 539685
Comment 2 Eclipse Genie CLA 2020-11-05 07:29:31 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Mauro Molinari CLA 2020-11-05 08:51:38 EST
This still applies to 2020-09.
Comment 4 Stephan Herrmann CLA 2021-05-22 17:25:16 EDT
Corrected, copy-pastable example:

//---
import java.beans.JavaBean;

@JavaBean(data -> {
  data.
})
public class Main {

}
//---

completion still times out on HEAD.
Comment 5 Eclipse Genie CLA 2023-05-30 18:25:36 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.