[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    Re: [groovy-user] Is a quoted string a valid name for a closure in a
From:       Guillaume Laforge <glaforge () codehaus ! org>
Date:       2009-03-29 20:20:30
Message-ID: 197b18fc0903291320g1afeccccy258656385ce0c929 () mail ! gmail ! com
[Download RAW message or body]

Hi Tony,

This sounds like a bug to me.
So you may consider submitting a JIRA request.
You may even consider submitting a patch ;-)

Guillaume

On Sun, Mar 29, 2009 at 19:35, asperkins <tony.perkins@travelocity.com> wrote:
> 
> The problem is this.
> 
> I create a config file with something like
> 
> 'main-header' {
> title='header'
> }
> 
> When I call the writeTo method on the ConfigObject created from the above
> example it removes the quotes from 'main-header' which results in a failure
> to parse into a new ConfigObject.
> 
> We are exposing config via REST, so we read the config then call writeTo to
> send it over the wire where it is parsed back into a ConfigObject.
> main-header{ will always fail. As a hack I have had to write a routine to
> scan the output of writeTo and replace ALL closure names with quoted
> versions.
> 
> Your thoughts?
> 
> 
> 
> Guillaume Laforge-2 wrote:
> > 
> > Yes.
> > 
> > On Fri, Mar 27, 2009 at 17:51, asperkins <tony.perkins@travelocity.com>
> > wrote:
> > > 
> > > Is this a valid groovy config file?
> > > 
> > > 'foo-bar' {
> > > name='john'
> > > }
> > > --
> > > View this message in context:
> > > http://www.nabble.com/Is-a-quoted-string-a-valid-name-for-a-closure-in-a-groovy-config-file--tp22745181p22745181.html
> > >  Sent from the groovy - user mailing list archive at Nabble.com.
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe from this list, please visit:
> > > 
> > > http://xircles.codehaus.org/manage_email
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > --
> > Guillaume Laforge
> > Groovy Project Manager
> > Head of Groovy Development at SpringSource
> > http://www.springsource.com/g2one
> > 
> > Attend the GR8 Conference, a conference dedicated to Groovy, Grails and
> > Griffon
> > http://www.gr8conf.org
> > 
> > Read the blog: http://www.gr8conf.org/blog/list
> > Follow us on Twitter: http://twitter.com/gr8conf
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> > 
> > http://xircles.codehaus.org/manage_email
> > 
> > 
> > 
> > 
> 
> --
> View this message in context: \
> http://www.nabble.com/Is-a-quoted-string-a-valid-name-for-a-closure-in-a-groovy-config-file--tp22745181p22770258.html
>  Sent from the groovy - user mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
> http://xircles.codehaus.org/manage_email
> 
> 
> 



-- 
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

Attend the GR8 Conference, a conference dedicated to Groovy, Grails and Griffon
http://www.gr8conf.org

Read the blog: http://www.gr8conf.org/blog/list
Follow us on Twitter: http://twitter.com/gr8conf

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic