tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Use (or not) of @SuppressWarnings
Date Thu, 08 Aug 2013 14:18:10 GMT
Jeremy,

On 8/7/13 11:38 AM, Jeremy Boynes wrote:
> On Aug 7, 2013, at 12:41 AM, Mark Thomas <markt@apache.org> wrote:
> 
>> For trunk we have been running a policy of zero warnings in the code.
>> This has helped to highlight issues as code is edited as any warnings
>> are immediately clear. Obviously, this depends on what warnings are enabled.
>>
>> Currently, we use Eclipse's "Ignore unavoidable generic type problems."
>> Recently a couple of issues has been highlighted with this:
>> 1. Other IDEs might not have this setting.
>> 2. javac does not have this setting
>> 3. Some of the problems Eclipse excludes are avoidable (well, sort of
>> avoidable as avoiding them requires using JRE methods that themselves
>> have @SuppressWarnings annotations).
>>
>> In favour of the current situation is that it reduces clutter in the
>> code base slightly.
>>
>> While I am all for reducing clutter in the code base, there do appear to
>> be good reasons for disabling the "Ignore unavoidable generic type
>> problems." and using @SuppressWarnings instead.
>>
>> Personally, I am happy with the current settings but not unhappy to
>> change. I guess that makes me +0 on changing. What does everyone else think?
> 
> I would prefer to use @SuppressWarnings for this rather than an IDE setting as that keeps
the information in the code.
> A stronger +1 for changing.

+1

@SuppressWarnings is likely to enjoy wider support across IDEs and has
the added benefit of actually having an effect when building with ant.

-chris


Mime
View raw message