@SuppressWarnings("null") really needed?

View: New views
3 Messages — Rating Filter:   Alert me  

@SuppressWarnings("null") really needed?

by olegk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: dev-help@...


Re: @SuppressWarnings("null") really needed?

by sebb-2-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <olegk@...> 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@...
>  For additional commands, e-mail: dev-help@...
>
>

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


Re: @SuppressWarnings("null") really needed?

by Sam Berlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <sebbaz@...> 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 <olegk@...> 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@...
> >  For additional commands, e-mail: dev-help@...
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>