Community
Participate
Working Groups
I20050509-2000 (M7 test pass) - have this setup: -------- Deprecation.java ---------- package m7testing; /** * @since 3.1 */ public class Deprecation { /** * comment */ @Deprecated public void foo() {} } -------- SubDeprecation.java --------- package m7testing; /** * @since 3.1 */ @SuppressWarnings("deprecation") public class SubDeprecation extends Deprecation { /** * @see m7testing.Deprecation#foo() */ @Override public void foo() { // TODO Auto-generated method stub super.foo(); } } ----------------------------- > expected: no deprecation warnings in SubDeprecation, as the entire class is marked with SuppressWarnings < actual: the reference in code to super.foo is not flagged, however, the reference in javadoc is flagged as warning.
Perhaps we should consider letting a @SuppressWarning annotation on a method also span the corresponding comment? Example: the following annotation only suppresses the one in code, but not the reference in the javadoc. Not sure if this is due to this bug, or due to the fact that the annotation comes after the comment. public class SubDeprecation extends Deprecation { /** * @see m7testing.Deprecation#foo() */ @Override @SuppressWarnings("deprecation") public void foo() { // TODO Auto-generated method stub super.foo(); } }
Normally @SuppressWarnings should span over entire declaration source range, i.e. including leading javadoc. However, there seems to be a bug wrt to deprecation warnings. Will investigate.
Deprecated Javadoc problem IDs were not bound to deprecated irritant and thus not recognized properly by @SuppressWarnings("deprecation"). Added AnnotationTest#test142 Fixed
fixed
Verified in I20050513-0010.