Isn't it enough trouble to have a 200 line method in the first place?  And
that's before you suppress warnings...

On 25 September 2010 10:18, Richard Fearn <[email protected]> wrote:

> On 23 September 2010 22:39, Reinier Zwitserloot <[email protected]>
> wrote:
> > @SuppressWarnings("throws") is a bit drastic as now ANY omission of
> > handling a checked exception anywhere in this code is going to go by
> > unnoticed, and it also doesn't help readability because it doesn't
> > list which particular kind of exception I'm actively going to ignore.
>
> This is a good point. I occasionally remind people that shoving
> @SuppressWarnings("something") to the top of a 200-line method is
> asking for trouble, because it causes *all* warnings of that type to
> be ignored.
>
> I've sometimes gone as far as to move one or two lines of code into a
> new method just so that @SuppressWarnings can be added to that method,
> instead of a larger method. Keeping the scope of an @SuppressWarnings
> as small as possible is a good idea.
>
> Of course, removing @SuppressWarnings altogether is even better :-)
>
> Rich
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Kevin Wright

mail / gtalk / msn : [email protected]
pulse / skype: kev.lee.wright
twitter: @thecoda

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to