Bug 138897

Summary: Error ranges for unreachable code
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Complete fix none

Description Martin Aeschlimann CLA 2006-04-27 08:58:50 EDT
20060427

In the following code the last statement is unreachable. The error range however is only the variable name. Would better be the full statement.

public class E {
	public String getName() {
		try{
			return "fred";
		}
		catch (Exception e){
			return e.getLocalizedMessage();
		}
		int i= 9;
	}
}

In the second example the method invocation is highlighted. Probably better to highlight the full statement.

public class E {
	public String getName() {
		try{
			return "fred";
		}
		catch (Exception e){
			return e.getLocalizedMessage();
		}
		System.err.print("wow");
	}
}
Comment 1 Olivier Thomann CLA 2007-02-02 11:08:00 EST
Created attachment 58122 [details]
Proposed fix
Comment 2 Olivier Thomann CLA 2007-02-08 10:21:01 EST
Created attachment 58560 [details]
Complete fix
Comment 3 Olivier Thomann CLA 2007-02-08 11:33:02 EST
Released for 3.3M6.
Updated existing regression tests.
Comment 4 David Audel CLA 2007-03-20 11:41:10 EDT
Verified for 3.3 M6 using build I20070320-0010