groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Di Tommaso <paolo.ditomm...@gmail.com>
Subject Re: ConfigSlurper issue
Date Sat, 25 Nov 2017 11:45:55 GMT
I've opened an issue for this problem.

https://issues.apache.org/jira/browse/GROOVY-8390


I've also tried to debug it, but I was unable to find a solution. Any help
would be appreciated.


Cheers,
Paolo


On Fri, Nov 24, 2017 at 9:16 PM, Paolo Di Tommaso <paolo.ditommaso@gmail.com
> wrote:

> It was my understanding that a ConfigObject dot notation is equivalent to
> curly brackets.
>
> However the following snippets create two different objects
>
>
> def first = '''
>         alpha.container = 'foo'
>
>         profiles {
>             beta.container='x/y'
>             delta.container='1/2'
>             alpha.container='bar'
>         }
>         '''
>
> def second = '''
>         alpha.container = 'foo'
>
>         profiles.beta.container='x/y'
>         profiles.delta.container='1/2'
>         profiles.alpha.container='bar'
>         '''
>
> assert new ConfigSlurper().parse(first) == new
> ConfigSlurper().parse(second)     // fail
>
>
>
> in particular printing the first ConfigObject it return the following
> string:
>
>
> alpha.container='bar'
> profiles {
> beta.container='x/y'
> delta.container='1/2'
> }
>
>
> that doesn't make much sense. Is this a bug or I'm missing something?
>
>
>
> Cheers,
> Paolo
>
>
>

Mime
View raw message