java.util.ConcurrentModificationException: null at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909) ~[na:1.8.0_231] at java.util.ArrayList$Itr.next(ArrayList.java:859) ~[na:1.8.0_231]
问题代码:
1 2 3 4 5
for (RptShiftCashCurrencyNEntity rptShiftCashCurrencyNEntity : rptShiftCashCurrencyNEntityList) { if ("B".equals(rptShiftCashCurrencyNEntity.getPosPayType()) || "G".equals(rptShiftCashCurrencyNEntity.getPosPayType()) || "N".equals(rptShiftCashCurrencyNEntity.getPosPayType()) || "8".equals(rptShiftCashCurrencyNEntity.getPosPayType()) || "9".equals(rptShiftCashCurrencyNEntity.getPosPayType())) { rptShiftCashCurrencyNEntityList.remove(rptShiftCashCurrencyNEntity); } }