I use concatenation of strings in order to build full file name. But at runtime exception occurred which was very strange and gave me no tip for possible mistake made. As I discovered later in my example You can not use dot in double quotes (".") cause Grails wants to interprete expression in them and fails.
Therefore You can solve mentioned situation in two ways:
- Use dot in single quotes ('.'). In that case correct solution might be:
- Move mentioned logic to some separate class (for instance, let's call it DocumentFileNameBuilder) and call it as it listed below: