Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2-RC2
-
Fix Version/s: 1.2.1
-
Component/s: Controllers
-
Labels:None
Description
If I have a g:datepicker on my page and disable the select elements using script the form will be submitted with a hidden field with the value "date.struct". This causes a ConcurrentModificationException to get raised in GrailsDispatcherServlet.copyParamsFromPreviousRequest.
The underlying cause is that GrailsParameterMap.get has special handling for any field with that value and will look for the expected accompanying date fields, if they are not found the entry is removed from the map - hence the Map is modified during iteration (see GrailsParameterMap.lazyEvaluateDateParam).
To be honest I'm not sure I consider this a bug as it's possible to disable a hidden field as well as the selects. However, it is a change from earlier versions of Grails where this problem didn't occur.
Example project attached.
Attachments
Issue Links
| This issue is duplicated by: | ||||
| GRAILS-5610 | nullable Date ends up in a java.util.ConcurrentModificationException |
|
|
|
I also get ConcurrentModificationException if any or all of the date picker fields are left blank.
Is there a workaround before 1.2.1 is released? Thanks!