diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:49:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:49:43 +0000 |
commit | f6fd796b779c81330e8657140001134f03e6cc29 (patch) | |
tree | cd2f94ccf6195c29af89e914da64edbe0482eeb9 /qadevOOo | |
parent | 9c0539ad409f2f82076f8b37b9ab9fb6b7594444 (diff) |
coverity#1326975 SBSC: String concatenation in loop using + operator
Change-Id: I3c00520c0337f8d282c0c63f08a3de43bf52b2d9
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/helper/BuildEnvTools.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qadevOOo/runner/helper/BuildEnvTools.java b/qadevOOo/runner/helper/BuildEnvTools.java index b967ee7f5872..60d328494f3e 100644 --- a/qadevOOo/runner/helper/BuildEnvTools.java +++ b/qadevOOo/runner/helper/BuildEnvTools.java @@ -150,14 +150,16 @@ public class BuildEnvTools { separator = ";"; } - String command = ""; + StringBuilder sb = new StringBuilder(); for (int i = 0; i < commands.length; i++) { if (i != 0) { - command += separator; + sb.append(separator); } - command += commands[i]; + sb.append(commands[i]); } + String command = sb.toString(); + if (mPlatform.equals(PropertyName.WNTMSCI)){ if (mCygwin){ String srcRoot = (String) param.get(PropertyName.SRC_ROOT); |