My code results in an error where I do not know how to fix it. I tried putting in print statements but It wont even make it that far. The error occurs
Here is the exact error
java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894)
at java.util.HashMap$KeyIterator.next(HashMap.java:928)
at ca.on.oicr.pinery.lims.gsle.GsleClient.getOrders(GsleClient.java:720)
Line 720 is the second for loop
ordersinside a loop that's looping over the elements oforders, that's what causes the exception. Don't modify a collection you're looping over inside the loop. Likewise withsamples.