lahodaj commented on code in PR #9285:
URL: https://github.com/apache/netbeans/pull/9285#discussion_r3323116814


##########
java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.java:
##########
@@ -319,6 +350,12 @@ public boolean ok () {
             logger.fine("      => URL = '"+url+"'");
             breakpoint.setURL((url != null) ? url.toString() : path);
             
breakpoint.setLineNumber(Integer.parseInt(tfLineNumber.getText().trim()));
+            String lambdaIndexText = tfLambdaIndex.getText().trim();
+            if (lambdaIndexText.isEmpty()) {
+                breakpoint.setLambdaIndex(new int[0]);
+            } else {
+                
breakpoint.setLambdaIndex(Arrays.stream(lambdaIndexText.split(", 
*")).mapToInt(v -> Integer.parseInt(v)).toArray());

Review Comment:
   @dbalek suggested the dialog should do validation, so i did that. The 
indexes are valid then (after the validation), I think, and can be relied on.



##########
java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointsReader.java:
##########
@@ -370,6 +372,10 @@ public void write (Object object, Properties properties) {
                 LineBreakpoint.PROP_LINE_NUMBER, 
                 lb.getLineNumber ()
             );
+            properties.setArray(
+                LineBreakpoint.PROP_LAMBDA_INDEX,
+                Arrays.stream(lb.getLambdaIndex()).mapToObj(v -> v).toArray()

Review Comment:
   Yes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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