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

Unable to add break-point for Java Stream methods(filter, map, etc)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 12.0, 11.3
    • Fix Version/s: None
    • Component/s: debugger - Java
    • Environment:
      Java: 14; OpenJDK 64-Bit Server VM 14+36-1461
      Runtime: OpenJDK Runtime Environment 14+36-1461
      System: Windows 10 version 10.0 running on amd64;

      Description

      Consider this source code:

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

      import java.util.Arrays;

      public class NewClass {

          public static void main(String... args) {
              Arrays.stream(new String[] {"a", "", "b"})
                    .filter(//breakpoint here{{}}

                          s -> !s.isEmpty()) 
                    .forEach(System.err::println);

                    }

      }

       

      Add breakpoint on the marked line. Breakpoint added to one line above not on the filter method(add). Source code editor should allow to add the breakpoint on the filter.

       

      Work around:

      1.Write filter and lambda expression on the single line like below

      .filter(s -> !s.isEmpty())

      2. Add breakpoint on this line

      3. Hit enter after the ".filter("

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                singh-akhilesh Akhilesh Singh
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: