I have written following code which is resulting in concurrent modification exception. How can I prevent it ? The idea is to escape all values of the Map and reconstruct the obj
Not sure you need to alter the keys of Map, it appears all you want to do is alter the values in the arrays.
for(String[] values: dO.getParameterMap().values())
for (int i = 0; i < values.length; i++)
values[i] = escapeHTML(values[i]);
I would make sure the Map does have null
values stored. But if you can't change this you will need to add if(values != null)