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
Please sign in to leave a comment.
Click on the lightbulb that appears near the warning. Choose "Edit options
of..."
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:
>> 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
>>
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.
http://www.jetbrains.net/jira/browse/IDEA-249
Maxim Shafirov wrote: