Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 573621

Summary: [content assist] completion shows 1 completion proposal processors requested. 0 completed; 1 pending.
Product: [Eclipse Project] JDT Reporter: Manoj N Palat <manoj.palat>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: 501895220, jarthana, manoj.palat, mauromol, stephan.herrmann
Version: 4.20   
Target Milestone: 4.21 M2   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=539685
Whiteboard:

Description Manoj N Palat CLA 2021-05-19 00:28:52 EDT
Follow-up of bug 539685 comment 23

A slightly modified code (just a space added at line 6 before requireNonNull(1)) is given below

import java.util.Objects;
import java.util.function.Function;

public class ReproduceHang {
    Function<String, Object> field = (value -> new Object() {
        private final int i = Objects. requireNonNull(1);// line 6 - complete after .
    });
    
    public static void main(String[] args) {
        Function<String, Object> localVar = (value -> new Object() {
            private final int i = Objects.requireNonNull(1);     // line 11
        });
    }
}

On completion after Objects. at line 6 gives "Computing proposals(0%): 1 completion proposal processors requested. 0 completed; 1 pending."
Comment 1 Manoj N Palat CLA 2021-05-19 00:30:20 EDT
Adding the Eclipse version: Build id: I20210518-0850
Comment 2 Stephan Herrmann CLA 2021-05-20 17:45:44 EDT
As it's a variant of the original problem, it doesn't seem to be a regression, right?
How badly would you want this fixed for 4.20?
If so, what would be the deadline?
Comment 3 lv yahui CLA 2021-07-31 20:01:56 EDT
Since upgrading to 2021-03, I have encountered the same problem. Has it been solved now
Comment 4 lv yahui CLA 2021-07-31 20:07:13 EDT
(In reply to Stephan Herrmann from comment #2)
> As it's a variant of the original problem, it doesn't seem to be a
> regression, right?
> How badly would you want this fixed for 4.20?
> If so, what would be the deadline?

4.20 does not solve this problem
Comment 5 Stephan Herrmann CLA 2021-08-15 18:14:07 EDT
Meanwhile this was fixed via https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=d5a7441da373df8e89653767579b519cc98c9a72 on behalf of bug 574912.

Interestingly, despite the emergency halt we get sufficient AST to actually make valid proposals.

*** This bug has been marked as a duplicate of bug 574912 ***
Comment 6 Manoj N Palat CLA 2021-08-19 02:57:46 EDT
Verified with Eclipse 4.21 M3 Version: 2021-09 (4.21) Build id: I20210818-1800
[content assist works]
Comment 7 Manoj N Palat CLA 2021-08-19 02:58:24 EDT
(In reply to Manoj Palat from comment #6)
> Verified with Eclipse 4.21 M3 Version: 2021-09 (4.21) Build id:
> I20210818-1800
> [content assist works]

And thanks Stephan for the fix as mentioned in comment 5