Bug 582252 - Editing code inside lambdas will move breakpoints down to arbitrary position
Summary: Editing code inside lambdas will move breakpoints down to arbitrary position
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:22 EDT by fozzy bear CLA
Modified: 2023-07-28 08:35 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:22:00 EDT
In Eclipse 4.28.0 (also previous versions) breakpoints inside lambdas will get pushed down to a seemingly arbitrary position outside at saving, if the same code line or one before was edited. 

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

assertAll(
  () -> {
    ... // 2) edit code and save
    ... // 1) Breakpoint set
    ...
  },
  () -> {  3) >> Breakpoint gets pushed here or below
    ...
  }
);
Since breakpoints cannot be moved, this gets especially nasty, when conditional breakpoints are being moved and broken this way each time. JDK currently is Oracle JDK 11.0.18.
Comment 1 fozzy bear CLA 2023-07-28 08:35:33 EDT
I should add, that repeatedly moved breakpoints stack up at the same line below, if not manually deleted each time (also showing up multiple times in the breakpoint view window) and the edited code line doesn't necessarily need to be inside the same lamda or maybe not even before the code line with the breakpoint.

So, the problem is even more disruptive, since not only you'll have to re-create dedicated breakpoints each time, but additionally need to delete the "zombie"-breakpoints generated by Eclipse.