Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.1.0Release
-
Fix Version/s: 2.1.2Release
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Attempting to set a breakpoint on the 'print 8' line will instead set the breakpoint on 'print 9'.
public class Printing {
Printing() {
print 8
}
def x = {
print 9
}
}
This is because of the way that Groovy rearranges field initializer nodes to be placed in a constructor.
In ValidBreakpointLocationFinder, for constructors and <clinit>, we need to change the ordering of statements being processed. Need to look at the RHS of an assignment if the assignment has no sloc and order by the RHS line number.
Issue Links
- relates to
-
GRECLIPSE-967
Breakpoint is set on wrong line number in Groovy Eclipse.
-
This is working now locally. There are some related issues that I will be fixing. See
GRECLIPSE-967andGRECLIPSE-976.I will not be committing until I have tests written for those issues as well.