[jdom-interest] JDom and Java5

Mattias Jiderhamn mj-lists at expertsystems.se
Tue Feb 26 13:23:23 PST 2008


Victor Toni wrote (2008-02-26 19:31):
> Mattias Jiderhamn wrote:
>> Rolf Lear wrote (2008-02-26 16:16):
>>> ... the @suppress would remove the warning like you said. 
>>> Unfortunately, I don't believe that is enough for an API.
>>>   
>> (Would you care to explain why compiler warnings must be avoided at 
>> all costs?)
>>
> "Avoiding warnings at all costs" sounds a bit strong. When writing a 
> new API (library, whatever) it's not alway possible to create 
> warning-less code.
> In these cases I tend to inspect the code section thoroughly and add 
> such annotations if possible. It gives a warm fuzzy feeling if the 
> counter goes down ;-)
> And it saves time because 3 months later I don't have to check the 
> same code again to see if it's just a warning or maybe a WARNING.
Yes, I agree on the @Suppress, but as I read Rolfs comment it is not 
enought to suppress the warning but we should aims to remove the cause 
of it. It almost seems like he is willing to adjust the external 
interface in order to avoid compiler warnings. I am not used to such an 
approach.

 /Mattias



More information about the jdom-interest mailing list