Akhilesh Singh created NETBEANS-4517:
----------------------------------------

             Summary: Unable to add break-point for Java Stream methods(filter, 
map, etc)
                 Key: NETBEANS-4517
                 URL: https://issues.apache.org/jira/browse/NETBEANS-4517
             Project: NetBeans
          Issue Type: Bug
          Components: debugger - Java
    Affects Versions: 11.3, 12.0
         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; 
            Reporter: Akhilesh Singh


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("



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to