netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Fix TreeUtilities.pathFor for synthetic 'value=' in annotations also for start position

Open matthiasblaesing opened this issue 1 year ago • 2 comments

Closes: #4186

matthiasblaesing avatar May 13 '24 20:05 matthiasblaesing

@mbien thanks for the quick review. I was triggered by the recent comment and that reminded me, that this behaviour annoyed the hell out of me. So I had a quick look. As @lahodaj already had fixes for end position -1 in place, that looked like the right place to have a closer look. In the end the position reported by javac was off by six (if I remember correctly) characters and that nicely matches the width of value=.

matthiasblaesing avatar May 14 '24 05:05 matthiasblaesing

I confirm that everything works like a charm.

Saljack avatar May 14 '24 06:05 Saljack