Mercurial > dive4elements > river
changeset 8069:86c1ff462fb5
More idiomatic Java string concat.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Tue, 05 Aug 2014 16:34:04 +0200 |
parents | 9ecd6267323b |
children | d77f53c1e5a1 |
files | gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultData.java |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultData.java Thu Jul 31 18:14:22 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultData.java Tue Aug 05 16:34:04 2014 +0200 @@ -128,16 +128,17 @@ * @return colon separated string. */ public String getStringValue() { - String data = ""; + StringBuilder sb = new StringBuilder(); boolean first = true; for (int i = 0; i < items.length; i++) { if (!first) { - data += ";"; + sb.append(';'); + } else { + first = false; } - data += items[i].getStringValue(); - first = false; + sb.append(items[i].getStringValue()); } - return data; + return sb.toString(); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :