Bug 582253 - Cannot set breakpionts for lambdas without curly braces
Summary: Cannot set breakpionts for lambdas without curly braces
Status: NEW
Alias: None
Product: Incubator
Classification: Eclipse Project
Component: e4 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: E4 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-28 07:32 EDT by fozzy bear CLA
Modified: 2023-07-28 07:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fozzy bear CLA 2023-07-28 07:32:44 EDT
In Eclipse 4.28.0 (also previous versions) breakpoints cannot be set at lines with lambdas without curly braces. This requires you to refactor forth and back pieces of code utilizing curly braces and return statements, just for the sake of debugging them each time. This can get very tedious for many consecutive changes in such situations. JDK currently is Oracle JDK 11.0.18.

An example would be lambda test functions from within JUnit jupiter (5.93./1.9.3) 

assertAll(
  () -> ... , // 1) cannot set breakpoint at this line
  // >> 2) refactoring to this form is required, to set a breakpoint each time
  () -> { 
    ...  // 3) can set breakpoint at this line for debugging
  },
  () -> ... , // 4) need to revert back to original form manually
);