groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Facundo Farias <...@caravelo.com>
Subject Using reserved words on Groovy Config files
Date Mon, 08 Aug 2016 13:19:06 GMT
Hello there!

Because we have external dependencies, we have to use some reserved words
on a Groovy file that will be parsed by the ConfigSlurper. We had to use
quotation marks, and the strange thing is: in the first level, it works (as
it can be seen on the IntelliJ screenshot, it is taken as a variable), but
then if we have at least one level of nesting, then it fails (as can be sen
on the screenshot, is not underlined).

[image: Inline image 1]
Of course, if we try to parse this file, the first scenario works, and the
second one throws this exception:

Exception in thread "main" java.lang.RuntimeException:
java.lang.NullPointerException: Cannot invoke method call() on null object

We ended up by escaping the nested variable, so now it looks like '*/it*'.
Does anyone knows a better solution? Is this a bug?

Thanks a lot,

Facundo

Mime
View raw message