如下代码在注释行会报错,原因是:getSeatTravelerInfo()时值为空,对空对象addAll会报错
SeatBookingInfo b=new SeatBookingInfo();
b.setIndex(index);
b.setContactInfo(contactInfo);
// b.getSeatTravelerInfo().addAll(seatTravelerInfo);
b.setSeatTravelerInfo(seatTravelerInfo);