- there are many warnings on "Local variable hides a field" (in many
sources), and i know the the code works good also with this, but what
do you think on changing a little these variables, to avoid this ?
Using Best practices always help ...
I actually think it's ok to have local variables hide a field.
Otherwise,
you end up naming your local variables with contrived names, and in
most (if
not all) cases where we do this, our local variable is a view (or
decorator,
in design pattern terminology) of our field, so the naming parity is
intentional.
Yeah. That *is* our recommended "best practice". :-)