Details
-
Sub-task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.0.0
-
None
-
None
Description
I have found this behaviour with groovy 2.0 (I didn't try with another version) which I think is wrong:
println new ConfigSlurper().parse("x{y{z}}")
-> [x:[y:[z:[:]]]] (this is what I expect so far)
println new ConfigSlurper().parse("x('a'){y{z}}")
-> [x:a, y:[z:[:]]]
println new ConfigSlurper().parse("x(a){y{z}}")
-> [a:[:], x:[:], y:[z:[:]]]
x is no longer a parent of y and z. if a is not a string, then x is not even related to a any-more
I was trying to do something like that, this example should let you guess the output I had in mind with this formula:
log4j {
appender{
ARoot('org.apache.log4j.ConsoleAppender') {
layout(''org.apache.log4j.PatternLayout') {
ConversionPattern'='%d %-5p %c
}
} // yummy
instead, I had to opt for this, but it isn't very satisfactory
log4j {
appender.ARoot='org.apache.log4j.ConsoleAppender'
appender.'ARoot.layout'='org.apache.log4j.PatternLayout'
appender.'ARoot.layout.ConversionPattern'='%d %-5p %c{3}
- %m%n'
} // yuk