Some config values not being set correctly #37

Closed
chrisbrookes opened this Issue Mar 2, 2014 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

chrisbrookes commented Mar 2, 2014

This recent commit: 5a1a53e#diff-9d1f5a2ac06358466ee9eef65a2976f5 has broken some configuration because some local vars are named the same as the bean closure delegate vars. E.g.:

def from, catchall
( from, catchall ) =
    [ "ses.from", "ses.catchall" ].collect { read( it ) ?: null }

sendSesMail(SendSesMail) { bean ->
    bean.singleton    = false
    credentialsHolder = ref('credentialsHolder')
    from              = from
    catchall          = catchall
}

"from = from" and "catchall = catchall" won't work. There are a few other 'silly assignments' (Intellij's words not mine!) in the same Class. The vars could be named something like fromVar as per some config earlier in the file.

Contributor

chrisbrookes commented Mar 2, 2014

The other vars are acl, bucket, bucketLocation in this bean config:

s3FileUpload(S3FileUpload) { bean ->
    bean.singleton    = false
    credentialsHolder = ref('credentialsHolder')
    acl               = acl
    bucket            = bucket
    bucketLocation    = bucketLocation
    rrs               = Boolean.valueOf(read("s3.rrs", "true") as boolean)
}

@chrisbrookes chrisbrookes added a commit to chrisbrookes/grails-aws that referenced this issue Mar 16, 2014

@chrisbrookes chrisbrookes fixed grails-aws#37 - missed one... 72a6b04
Owner

j4y commented Mar 26, 2014

Please create a pull request and I will merge this in.

j4y closed this in 530556f Mar 26, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment