In JDK 1.1, using the JavaDoc @deprecated tag for a method
overriding a deprecated method would block the compiler from
reporting a warning. Currently, I'm getting deprecation warnings
under JDK 1.3 which are not generated in JDK 1.1 (I would get a
warning in JDK 1.1 if I removed the @deprecation tag).
This is important, since we need to have clean, no-warnings
compiles. Generating the warning might make a developer think there
is a problem. In fact, we sometimes have to override a deprecated
method since there is 3rd-party software we use which uses the
deprecated methods rather than their replacements.
Here's a quick example:
private final class Sample extends Canvas {
/**
* @deprecated
*/
public Dimension preferredSize() {
return getMinimumSize();
}
}
overriding a deprecated method would block the compiler from
reporting a warning. Currently, I'm getting deprecation warnings
under JDK 1.3 which are not generated in JDK 1.1 (I would get a
warning in JDK 1.1 if I removed the @deprecation tag).
This is important, since we need to have clean, no-warnings
compiles. Generating the warning might make a developer think there
is a problem. In fact, we sometimes have to override a deprecated
method since there is 3rd-party software we use which uses the
deprecated methods rather than their replacements.
Here's a quick example:
private final class Sample extends Canvas {
/**
* @deprecated
*/
public Dimension preferredSize() {
return getMinimumSize();
}
}
- duplicates
-
JDK-4683801 Impossible to implement PreparedStatement without deprecation warnings
-
- Closed
-
-
JDK-4825850 deprecated warnings in implementing class
-
- Closed
-
-
JDK-4460939 RFE: Deprecated inheritance method resolution
-
- Closed
-