diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:42:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:42:43 +0000 |
commit | e24683f321a10415d6f2afc870b2ab3fe6150789 (patch) | |
tree | c5d8b06513320863416d53734b1ca6c37928f7b9 /wizards | |
parent | bd0483f62bf09fec33230fb8f4a58dd26fae0b76 (diff) |
coverity#1326996 SBSC: String concatenation in loop using + operator
Change-Id: Idebeeac2cc680c14230e059761a05bec7e4c6c60
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/query/QuerySummary.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index d6bb2f7422ef..9e0b531828b0 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -160,17 +160,17 @@ public class QuerySummary extends QueryMetaData private String ArrayFieldsToString(int _InitResID, String[] _FieldNames) { - String sReturn = oResource.getResText(_InitResID); + StringBuilder sReturn = new StringBuilder(oResource.getResText(_InitResID)); int FieldCount = _FieldNames.length; for (int i = 0; i < FieldCount; i++) { - sReturn += this.getFieldColumnByDisplayName(_FieldNames[i]).getFieldTitle(); + sReturn.append(this.getFieldColumnByDisplayName(_FieldNames[i]).getFieldTitle()); if (i < FieldCount - 1) { - sReturn += sSeparator; + sReturn.append(sSeparator); } } - return sReturn; + return sReturn.toString(); } private String combinePartString(int _InitResID, String[][] _FieldNames, int _AlternativeResID, int _BaseStringID, String[] _ReplaceTags) |