lahodaj commented on code in PR #9285:
URL: https://github.com/apache/netbeans/pull/9285#discussion_r3323163894
##########
java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/breakpoints/LineBreakpointImpl.java:
##########
@@ -697,6 +709,39 @@ private static String normalize(String path) {
return path;
}
+ private List<Location> filterLocationsByLambdaIndex(List<Location>
locations, int[] lambdaIndex) {
+ if (lambdaIndex.length == 0) {
+ return locations;
+ } else {
+ Map<String, List<Location>> lambda2Locations = new
LinkedHashMap<>();
+ List<Location> outsideOfLambda = new ArrayList<>();
+
+ for (Location l : locations) {
+ if (l.method().name().startsWith("lambda$")) {
Review Comment:
Right, this is a heuristics. I've added comments to that effect. Moreover,
@dbalek found out the heuristics is not working for classfiles generated by ecj
(the order of methods differs, so it there are multiple lambdas on the same
line, the counting goes from the back, not from front), I added more heuristics
to guess this state.
Still, just a heuristics, but (to my knowledge), there's simply not enough
information in the classfile to avoid guessing a bit.
Thanks for the comment in any case!
--
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