A Question of Style

January 8, 2016|Posted in: Java

Going through legacy code and I find this:

if (docs != null) {
if (docs.size() > 0) {
...
}
}

Since there is no else is there a good reason to not just have a single if statement?


if (docs != null && docs.size() > 0) {
...
}

Thoughts?

General purpose computer geek.