tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Burch <br...@PingToo.com>
Subject Re: Use (or not) of @SuppressWarnings
Date Wed, 07 Aug 2013 15:40:24 GMT
On 07/08/13 14:14, Nick Williams wrote:
>
> On Aug 7, 2013, at 2:41 AM, Mark Thomas 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?
>
> (Non-binding)
>
> As stated earlier, I am fundamentally opposed to the concept of using an IDE-specific
setting to decide how a project writes code. This practically forces all developers to use
that IDE exclusively for that project. If I'm writing Tomcat code in IntelliJ IDE and I create
a warning, I have no idea whether I should correct the warning or not, because I have no idea
what Eclipse has to say about it.
>
> I do, however, know that the warning will show up when I compile, and I think that's
what matters most. We should make efforts to eliminate all warnings that show up when we compile,
whether Eclipse calls them "unavoidable" or not.
>
> My $0.02.

OK, I'll add my non-binding penny.

I use netbeans exclusively. I get warnings about import order from 
almost every tc source file. Periodically I scratch around looking for 
the rules template so I can change them to conform with the ant 
checkstyle rules, which are happy with the current import order. So far, 
no luck, so I live with netbeans nagging and resist the temptation to 
let it re-order the imports for me.

I think ant should compile without warnings. I think we should all put 
up with whatever our ide's bleat about... or figure out how to coerce 
them to follow the external/common build code style rules.

> Nick
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message