Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3579

Code completion not working inside block lambdas

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 12.0, 11.2
    • 12.3
    • None
    • None
    • Important

    Description

      Consider the following code ('|' should not be part of the code, and represents where the caret should be placed):

      package org.netbeans.modules.learning.lambda.code.completion;

      import java.util.Collection;

      public class NewClass {

          public int compute(Collection<String> c) {
              return c.stream().map(s -> {s.|)
      {{    }}}
      }

      Invoking the code completion at the marked place ('|') yields not results whatsoever for me. That is apparently wrong - there should be results for a variable of type String.

       

      The IDE is a fully updated Apache NetBeans 11.2, with nb-javac installed running on JDK 13:
      Product Version: Apache NetBeans IDE 11.2
      Java: 13.0.1; OpenJDK 64-Bit Server VM 13.0.1+9
      Runtime: OpenJDK Runtime Environment 13.0.1+9
      System: Linux version 4.15.0-72-generic running on amd64; UTF-8; en_US (nb)
      User directory: /tmp/nbuser.lambda.test
      Cache directory: /tmp/nbuser.lambda.test/var/cache

      Attachments

        1. 3579.png
          241 kB
          Akhilesh Singh
        2. RE Defect #3579 Status Findings.msg
          416 kB
          Akhilesh Singh
        3. RE Defect #3579 Status Findings.msg
          416 kB
          Akhilesh Singh
        4. Screenshot (346).png
          290 kB
          Akhilesh Singh

        Issue Links

          Activity

            People

              singh-akhilesh Akhilesh Singh
              jlahoda Jan Lahoda
              Votes:
              5 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: