Skip to content

Commit fc484c2

Browse files
author
graeme
committed
fix for GRAILS-2128
git-svn-id: https://svn.codehaus.org/grails/trunk@6474 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d
1 parent 0f197a6 commit fc484c2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/web/org/codehaus/groovy/grails/web/servlet/GrailsFlashScope.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,18 @@ public void next() {
4141
current.clear();
4242
current = (HashMap)next.clone();
4343
next.clear();
44-
reassociateObjectsWithErrors();
44+
reassociateObjectsWithErrors(current);
4545
}
4646

47-
private void reassociateObjectsWithErrors() {
48-
for (Iterator i = current.keySet().iterator(); i.hasNext();) {
47+
private void reassociateObjectsWithErrors(Map scope) {
48+
for (Iterator i = scope.keySet().iterator(); i.hasNext();) {
4949
Object key = i.next();
50-
Object value = current.get(key);
50+
Object value = scope.get(key);
51+
if(value instanceof Map) {
52+
reassociateObjectsWithErrors((Map)value);
53+
}
5154
String errorsKey = ERRORS_PREFIX + System.identityHashCode(value);
52-
Object errors = current.get(errorsKey);
55+
Object errors = scope.get(errorsKey);
5356
if(value!=null && errors != null) {
5457
MetaClass mc = GroovySystem.getMetaClassRegistry().getMetaClass(value.getClass());
5558
if(mc.hasProperty(value, ERRORS_PROPERTY)!=null) {

0 commit comments

Comments
 (0)