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
the exception is thrown because you are adding/removing things from the map while you are iterating it:
dO.removeParameter(entry.getKey()); dO.addParameter(entry.getKey(),valList.toArray(new String[valList.size()]
you should use iterator.remove() instead.
iterator.remove()