Bug 172207 - [model] Marker for deprecated classpath variable should always have WARNING severity
Summary: [model] Marker for deprecated classpath variable should always have WARNING s...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 171049
  Show dependency tree
 
Reported: 2007-01-30 13:52 EST by Markus Keller CLA
Modified: 2007-02-06 05:09 EST (History)
0 users

See Also:


Attachments
Proposed patch (4.04 KB, patch)
2007-01-31 13:25 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2007-01-30 13:52:32 EST
HEAD

The problem markers generated for references to deprecated classpath variables currently have ERROR severity (at least when build path error severity is set to Error). 

The problem is maybe in JavaProject.createClasspathProblemMarker(IJavaModelStatus) where the
"switch (status.getCode())" does not have a special case for IJavaModelStatusConstants.DEPRECATED_VARIABLE and thus the JavaCore.CORE_INCOMPLETE_CLASSPATH option is consulted for the severity.

Adding
			case  IJavaModelStatusConstants.DEPRECATED_VARIABLE :
				severity = IMarker.SEVERITY_WARNING;
				break;
fixed it for me, but I'm not sure if that's the correct fix.
Comment 1 Markus Keller CLA 2007-01-30 15:50:20 EST
Actually, you should also set the path argument to the marker (like in the
default clause), so that a quick fix (e.g. for JUNIT_HOME/***) can find out
whether it is applicable.
Comment 2 Frederic Fusier CLA 2007-01-31 13:25:58 EST
Created attachment 57926 [details]
Proposed patch
Comment 3 Frederic Fusier CLA 2007-02-01 05:07:50 EST
Released for 3.3 M5 in HEAD stream.
Comment 4 Maxime Daniel CLA 2007-02-06 05:09:29 EST
Contrasted the test case results for M5 candidate (v_734) and v_733.
Verified for 3.3 M5 using build I20070205-1824.