FedespatchVO fedespatch = new FedespatchVO();
List<FedespatchVO> listFedespatch = null;
while (rs.next()) {
System.out.println("I have something in me");
fedespatch.setSerialNumber(rs.getString(1));
fedespatch.setMachine(rs.getString(2));
fedespatch.setHours(rs.getString(3));
fedespatch.setTrigger(rs.getString(4));
fedespatch.setNoticeTime(rs.getString(5));
listFedespatch.add(fedespatch);
}
listFedespatch.add(fedespatch);
正在抛出空指针异常。我需要返回 FedespatchVO 类的返回列表,它只不过是序列号、机器、通知时间等属性的 getter 设置器。
我的方法错了吗?请帮忙