List<PrcSubList> listSl = new ArrayList<PrcSubList>();
if (listSl == null || listSl.size() == 0) {
PrcSubList subListAdd=coreService.addSubListByAddAlert(childSub);
System.out.println("sublist after insert db :" + subListAdd.getName());
listSl.add(subListAdd);
System.out.println(listSl.size() +" sublist after insert list:" + listSl.get(0).getName());
}
输出第一个 System.out.println("插入 db 后的子列表:" + subListAdd.getName());
插入数据库后的子列表:SYSTEM_ALERT_12312313
问题
但我有第二个 NullPointerException
System.out.println(listSl.size() +" sublist after insert list:" + listSl.get(0).getName());
你能帮助我吗!