09 August 2008

null check

i saw this in some code the other day...

if (foo != null) {
// do some work on foo
}

bar = foo.data;


if you know enough to put in a null check...

1 comment:

pyker said...

Hopefully the two sections were done by two different developers. Then it's just lack of attention.