groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Erick" <>
Subject Re: Long String concatenation failed
Date Tue, 25 Sep 2018 12:39:02 GMT
No, I mean markup builder.
Mr Haki says it best….

Erick Nelson
Senior Developer – IT
HD Supply Facilities Maintenance
(858) 740-6523

From: mg <>
Reply-To: "" <>
Date: Tuesday, September 25, 2018 at 5:19 AM
To: "" <>
Subject: Re: Long String concatenation failed

If it is just the CTE that is the problem, you just have ro move the "<<" to the end
of the previous line...

-------- Ursprüngliche Nachricht --------
Von: Jmeter Tea <>
Datum: 25.09.18 09:56 (GMT+01:00)
Betreff: Long String concatenation failed


I have to  concatenate a lot of variables in a script and I want to make it readable, but
I failed to separate lines as in java, The following code doesn't compile due to:

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

Script1.groovy: 2: unexpected token: << @ line 2, column 1.

   << vars["id2"] << "<id2>"


String text ="<id>" <<vars["id1"] << "<id><id2>"

<< vars["id2"] << "<id2>";

Is there a workaround or a better way concatenation a string in groovy?

Related question:

Thank you
View raw message