Bug 550160 - [code completion] StackOverflowError in code completion for inner classes within lambdas
Summary: [code completion] StackOverflowError in code completion for inner classes wit...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.12   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 550794 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-16 16:21 EDT by Luke Hutchison CLA
Modified: 2023-08-18 13:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Hutchison CLA 2019-08-16 16:21:23 EDT
Given the following code:


    new SecurityManager() {/*(1)*/};
        
    PrivilegedAction<SecurityManager> callerResolverAction = 
            (PrivilegedAction<SecurityManager>) () -> 
                    new SecurityManager() {/*(2)*/};


Code completion (Ctrl+Space) at (1) works fine.

Code completion at (2) fails with:


java.lang.StackOverflowError
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedStatement(RecoveredBlock.java:409)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedBlock(RecoveredBlock.java:353)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedStatement(RecoveredBlock.java:409)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedBlock(RecoveredBlock.java:353)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedStatement(RecoveredBlock.java:409)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedBlock(RecoveredBlock.java:353)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedStatement(RecoveredBlock.java:409)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.updatedBlock(RecoveredBlock.java:353)
Comment 1 Stephan Herrmann CLA 2019-09-05 10:45:29 EDT
*** Bug 550794 has been marked as a duplicate of this bug. ***
Comment 2 Eclipse Genie CLA 2021-08-26 18:03:18 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.
Comment 3 Eclipse Genie CLA 2023-08-18 13:05:03 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.