Skip to content

Commit c400552

Browse files
Revert "reorder command object DI"
This reverts commit 4d825ce.
1 parent 4d825ce commit c400552

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/java/org/codehaus/groovy/grails/web/plugins/support/WebMetaUtils.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ class WebMetaUtils {
113113
}
114114

115115
bind.invoke(commandObject, "bindData", [commandObject, commandParams] as Object[])
116-
if(newCommandObject) {
117-
ctx.autowireCapableBeanFactory?.autowireBeanProperties(
118-
commandObject, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false)
119-
}
120116
def errors = commandObject.errors ?: new BindException(commandObject, paramType.name)
121117
def constrainedProperties = commandObject.constraints?.values()
122118
for (constrainedProperty in constrainedProperties) {
@@ -126,6 +122,10 @@ class WebMetaUtils {
126122
}
127123
commandObject.errors = errors
128124

125+
if(newCommandObject) {
126+
ctx.autowireCapableBeanFactory?.autowireBeanProperties(
127+
commandObject, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false)
128+
}
129129
}
130130
catch (Exception e) {
131131
throw new ControllerExecutionException("Error occurred creating command object.", e)

0 commit comments

Comments
 (0)