#java.util.ConcurrentModificationException
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
haven't seen the code, but that error usually means your trying the alter the code in a place where it cannot be alterd
this is code
variableProduction.put(key,newProductionList );
when i comment this it works
how can i fix
You can't modify a collection while iterating over it. I think the first put call is fine as the key already exists, but the second one breaks. What behavior are you expecting? Do you want the loop to go over the added entries?
or check if the key exists and update the contents
but it needs to be added there :((((
then u need to rework the algo so it adds after the collection is not in use