How to desactivate "Variable 'foo' initializer 'null' is redundent" warnings?

Hi.

We use a lot of "Foo foo = null;" in our code even if "= null" is not
needed, as a code writing convention.
I tried to desactivate the warning resulting, but could not find it.

Thanks for your help

BoD

4 comments
Comment actions Permalink

Click on the lightbulb that appears near the warning. Choose "Edit options
of..."

Hi.

We use a lot of "Foo foo = null;" in our code even if "= null" is not
needed, as a code writing convention.
I tried to desactivate the warning resulting, but could not find it.
Thanks for your help

BoD



0
Comment actions Permalink

Oh thanks.

But it's too bad actually.

"This inspection points out the cases where a variable value is never
used after its assignment, i.e.:
- the variable never gets read after assignment OR
- the value is always overwritten with another assignment before the
next variable read OR
- the variable initializer is redundant (for one of the above two
reasons) OR
- the variable is never used"

Points 1, 2 and 4 are useful, so I'd like to disable only point 3
without disabling all of them, but it's not possible...

Oh well...

BoD


Maxim Shafirov wrote:

Click on the lightbulb that appears near the warning. Choose "Edit
options of..."

>> Hi.
>>
>> We use a lot of "Foo foo = null;" in our code even if "= null" is not
>> needed, as a code writing convention.
>> I tried to desactivate the warning resulting, but could not find it.
>> Thanks for your help
>>
>> BoD
>>


0
Comment actions Permalink

But it's too bad actually.

Points 1, 2 and 4 are useful, so I'd like to disable only point 3
without disabling all of them, but it's not possible...


Well, you may submit a JIRA request so we'll implement a few checkboxes on
the option page for that inspection so you can control different features
to switch on/off.

0
Comment actions Permalink

http://www.jetbrains.net/jira/browse/IDEA-249


Maxim Shafirov wrote:


Well, you may submit a JIRA request so we'll implement a few checkboxes
on the option page for that inspection so you can control different
features to switch on/off.

0

Please sign in to leave a comment.