Summary: | Questions on IAccessRule.ignoreIfBetter | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.2 | ||
Target Milestone: | 3.2 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Martin Aeschlimann
2006-01-17 10:46:58 EST
Thanks for pointing the API flaw. I will change API to state that the next entry is considered instead of the next rule. Changed spec to: /** * Returns whether the rule should be ignored if a better rule is found on * another classpath entry. * E.g. if a rule K_NON_ACCESSIBLE | IGNORE_IF_BETTER matches type p.X on * a library entry 'lib1' and a rule K_DISCOURAGED that also matches p.X is * found on library entry 'lib2' - 'lib2' being after 'lib1' on the classpath, * then p.X will be reported as discouraged. * * @return whether the rule should be ignored if a better rule is found on * another classpath entry * @since 3.2 */ I would focus on the type. It's not the rule that is ignored, but the type. When a source or class file matches this access rule's pattern, the type in this classpath entry is ignored if no other type with the same qualified name can be found later in the build path that has a better accessibility. Ok, that wasn't correct either: When a source or class file matches this access rule's pattern, the type in this classpath entry is ignored iff an type with the same qualified name can be found later in the build path with a better accessibility. Thanks Martin. Changed spec to: /** * Returns whether a type matching this rule should be ignored iff a type with * the same qualified name can be found on a later classpath entry with a better * accessibility.</p> * <p>E.g. if a type p.X matches a rule K_NON_ACCESSIBLE | IGNORE_IF_BETTER * on a library entry 'lib1' and another type p.X also matches a rule * K_DISCOURAGED on library entry 'lib2' ('lib2' being after 'lib1' on the * classpath), then p.X from 'lib2' will be used and reported as * discouraged.</p> * * @return whether a type matching this rule should be ignored iff a type * with the same qualified name can be found on a later classpath * entry with a better accessibility * @since 3.2 */ Verified for 3.2 M5 using build I20060214-0010. |