diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:50:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:50:07 +0000 |
commit | 4d4114668e130f60bcecfa50bf0708362f5d4261 (patch) | |
tree | 4b82522c486751be98a022162a9098f8b4004dbe /wizards | |
parent | 5640826c0d5abb25681223eee4e632cf581ea160 (diff) |
coverity#1326994 SBSC: String concatenation in loop using + operator
Change-Id: I4fdd7388012b8773b59a69589c06d95d5d51f389
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/db/QueryMetaData.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java index 1286c9f698dd..abbc6036754c 100644 --- a/wizards/com/sun/star/wizards/db/QueryMetaData.java +++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java @@ -147,14 +147,15 @@ public class QueryMetaData extends CommandMetaData ArrayList<String> CommandNames = new ArrayList<String>(1); for (int i = 0; i < _FieldNames.length; i++) { - String CurCommandName = PropertyNames.EMPTY_STRING; String[] MetaList = JavaTools.ArrayoutofString(_FieldNames[i], "."); if (MetaList.length > 1) { + StringBuilder sb = new StringBuilder(PropertyNames.EMPTY_STRING); for (int a = 0; a < MetaList.length - 1; a++) { - CurCommandName += MetaList[a]; + sb.append(MetaList[a]); } + String CurCommandName = sb.toString(); if (!CommandNames.contains(CurCommandName)) { CommandNames.add(CurCommandName); @@ -166,8 +167,6 @@ public class QueryMetaData extends CommandMetaData return sIncludedCommandNames; } - - public void initializeFieldTitleSet() { try |