Compile with flags "-deprecation -g " with jikes/1.21 and everything is fine.
Compile with same flags with jikes/1.22 and we get errors.
---- Error generated ------
Found 1 semantic error compiling "src/bios/jcommon/sql/LogPreparedStatement.java":
123. public void setUnicodeStream (int pos, InputStream is, int len) throws SQLException {
^-------------------------------------------------^
*** Semantic Error: The overridden method "void setUnicodeStream(int pos, java.io.InputStream is, int len) throws java.sql.SQLException;" is deprecated in type "java.sql.PreparedStatement".
--------------------------------------
The source code looks like this:
--------------- Source code parts ------------
public class LogPreparedStatement extends LogStatement implements PreparedStatement {
/**
* @deprecated hubba bubba..
*/
public void setUnicodeStream (int pos, InputStream is, int len) throws SQLException {
//setArg (pos, is);
//p.setUnicodeStream (pos, is, len);
throw (new SQLException ("Trying to use deprecated methods..."));
}
/* Lots of more code. */
----------------------------------
That method is deprecated in the jdk, but since this is an interface it has to be implemented.
Marking it as @deprecated used to work with jikes/1.21
this is the same as javac's behavior.
Neither of jdk/1.4.2 or 1.5.0 gives error or even warnings on the given example. Not even when the compile flags include "-deprecation'
Javac normally gives a _warning_ when it encounters a method that is deprecated. However if the method has a javadoc with a @deprecated tag javac will not complain.
So, no I do not think this is the same as javacs behaviour.
i see; i understand your complaint now. deprecation warnings should be disabled in deprecated contexts, and this one isn't. i've updated the title accordingly.
fixed in CVS.
CVS version seems to work ok, thanks.
Logged In: NO
used to be jikes bug 4058 (makes it easier to find this page)