Fix Groovy array declaration

See gh-1016
This commit is contained in:
markstrecker 2019-10-11 10:28:15 -04:00 committed by Stephane Nicoll
parent 20b03fc6df
commit 4a2b3edcc8

View File

@ -179,7 +179,7 @@ public class GroovySourceCodeWriter implements SourceCodeWriter<GroovySourceCode
private String formatValues(List<String> values, Function<String, String> formatter) {
String result = values.stream().map(formatter).collect(Collectors.joining(", "));
return (values.size() > 1) ? "{ " + result + " }" : result;
return (values.size() > 1) ? "[ " + result + " ]" : result;
}
private void writeFieldDeclaration(IndentingWriter writer, GroovyFieldDeclaration fieldDeclaration) {