commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: [CLI] fixing warnings
Date Thu, 21 Apr 2011 10:59:52 GMT
Le 21/04/2011 10:21, Simone Tripodi a écrit :

>   - @deprecated in the javadoc is for human readability, @Deprecated is
> for the compiler;

The compiler is fine with the javadoc tag, and the annotation doesn't 
provide a useful comment to the user explaining why it's deprecated and 
what to use instead. That's why I don't use this annotation.

>   - @Override: I suggest you this reply on StackOverflow
> http://s.apache.org/q5s where justified the use of @Override

The scenario described is not going to happen here. It's impossible to 
change the signature of a method in a super class and forgetting to 
change the subclasses without breaking a bunch of tests. In the end this 
annotation just adds useless noise.

>   - final: I would add also immutable fields

Some fields might be immutable today but variable tomorrow. Why limiting 
the options for the future now? There is no harm letting the fields as 
non final and changing them later if necessary. On the other hand, you 
are going to hesitate and ponder if the sky isn't going to fall if you 
have to remove a final modifier later that was added without a very good 
reason.

Emmanuel Bourg


Mime
View raw message