In POJO Java beans such code can be beneficial, especially with collections:
class POJO {
private Collection<
I do not see it as a good practice, more as some very rarely needed optimization. Maybe lazy initialization can make sense if SomeCollection is extremely heavy to create. Instead you can initialize it when declared (code is cleaner at least for my eyes):
class POJO {
private Collection col = new SomeCollection();
public Collection getCol() {
return col;
}
}
There is no side effects in flush or portability issues and you have one null check less.