A friend of me advices me to initialise DTO fields of type (ArrayList) and only of type ArrayList in DTOs like this to avoid NullPointerException
public class fooDto {
private SomeClasse someClasse = new SomeClasse();
private ArrayList<Bar> bars = new ArrayList();
}
should we do his ? and is it a good practice
in other way , should we use "= new SomeClasse()" or not ?