Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325690

Summary: [model] Annotation uses outdated source range if working copy is inconsistent
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: JDT Core Triaged <jdt-core-triaged>
Status: CLOSED WONTFIX QA Contact: Jay Arthanareeswaran <jarthana>
Severity: normal    
Priority: P3 CC: amj87.iitr
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
test case none

Description Stephan Herrmann CLA 2010-09-18 18:36:15 EDT
Created attachment 179194 [details]
test case

While debugging a completely different issue I noticed that 
Parser.parseMemberValue(..) is invoked with garbled source when 
operating on an inconsistent working copy. 

The original scenario involved the hierarchy builder which essentially 
ignored the garbled annotation. However, I managed to create a failing 
test case, where reconciling actually reports that a type cannot be 
resolved due to bogus errors.


The culprit seems to be in Annotation.getSourceRange().
At this point I stopped debugging, because I'm not 100% sure 
if this scenario is *supposed* to work.

The original example occurred in real world, yet I couldn't trigger
the problem described here to surface to the user.
Comment 1 Ayushman Jain CLA 2010-09-20 02:34:42 EDT
Jay, please follow up. Thanks!
Comment 2 Stephan Herrmann CLA 2011-02-25 10:08:48 EST
Still occurs in HEAD.
Comment 3 Eclipse Genie CLA 2019-11-20 09:01:34 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.