Summary: | Deprecation is not checked when subclassing a deprecated member type | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 2.1 M5 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Olivier Thomann
2002-12-17 15:33:10 EST
Seems like the AccDeprecated flag isn't properly propagated through member types. X$Y is tagged as deprecated. The problem seems to be the detection of the usage of deprecated classes when the class is a member type. The bug came from the getModifiers() method on ClassFileReader. If the classfile reader had a inner info (it is an inner class) the modifiers were the inner infos modifiers and not the access flags. The AccDeprecated flag was contained only in the access flags value and not in the inner attribute. This method should be changed for: public int getModifiers() { if (this.innerInfo != null) { if ((this.accessFlags & AccDeprecated) != 0) { return this.innerInfo.getModifiers() | AccDeprecated; } else { return this.innerInfo.getModifiers(); } } return this.accessFlags; } This fixes the problem. Fixed and released in 2.1 stream. Regression test added. Verified. |