You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2009/11/06 17:29:47 UTC
@SuppressWarnings("null") really needed?
Hi Sebastian,
Since your last commit my Eclipse pops up a warning saying 'Unnecessary
@SuppressWarnings("null")'. What is the purpose of this annotation? Is
it needed?
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: @SuppressWarnings("null") really needed?
Posted by Sam Berlin <sb...@gmail.com>.
Eclipse 3.4 & 3.5 changed the way they handle warnings. For example, in 3.4
a private inner class with unused public variables would not warn about
unused variables. In 3.5, it does warn (and adding a suppression for 3.5
will cause 3.4 to warn about an unnecessary suppression). I assume there's
similar changes for null handling.
Sam
On Fri, Nov 6, 2009 at 11:47 AM, sebb <se...@gmail.com> wrote:
> Well, without it _I_ get a warning that the variable could be null...
>
> I assume we must have different local Eclipse settings.
>
> Not sure how to deal with the problem - seems to me Eclipse is being
> too literal about the warning in your case.
>
> ==
>
> I found these regarding the annotation:
>
>
> http://knol.google.com/k/alex-miller/suppresswarnings-annotation-in-java/1f092vcri65lh/3#
>
>
> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
>
> On 06/11/2009, Oleg Kalnichevski <ol...@apache.org> wrote:
> > Hi Sebastian,
> >
> > Since your last commit my Eclipse pops up a warning saying 'Unnecessary
> > @SuppressWarnings("null")'. What is the purpose of this annotation? Is it
> > needed?
> >
> > Oleg
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > For additional commands, e-mail: dev-help@hc.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
Re: @SuppressWarnings("null") really needed?
Posted by sebb <se...@gmail.com>.
Well, without it _I_ get a warning that the variable could be null...
I assume we must have different local Eclipse settings.
Not sure how to deal with the problem - seems to me Eclipse is being
too literal about the warning in your case.
==
I found these regarding the annotation:
http://knol.google.com/k/alex-miller/suppresswarnings-annotation-in-java/1f092vcri65lh/3#
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
On 06/11/2009, Oleg Kalnichevski <ol...@apache.org> wrote:
> Hi Sebastian,
>
> Since your last commit my Eclipse pops up a warning saying 'Unnecessary
> @SuppressWarnings("null")'. What is the purpose of this annotation? Is it
> needed?
>
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org