diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:39:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:39:24 +0000 |
commit | 66103ac97e38cf902f9d57bd142a8cd45b824862 (patch) | |
tree | 97bdb58fbd334b016f5ea39a1dce4647aa860d66 /qadevOOo | |
parent | 825caafe02256f40ef98cc828eeb35b2783444e3 (diff) |
coverity#1326981 SBSC: String concatenation in loop using + operator
Change-Id: I4bcde379701e8f3542f8e54e59b529466213d72e
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/util/dbg.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qadevOOo/runner/util/dbg.java b/qadevOOo/runner/util/dbg.java index 2d711a1235c9..d7f77c5250e9 100644 --- a/qadevOOo/runner/util/dbg.java +++ b/qadevOOo/runner/util/dbg.java @@ -208,18 +208,18 @@ public class dbg { if (ps.Value instanceof String[] ){ String[] values = (String[]) ps.Value; - String oneValue = "value is an empty String[]"; + StringBuilder oneValue = new StringBuilder("value is an empty String[]"); if (values.length > 0){ - oneValue = "['"; + oneValue.append("['"); for( int i=0; i < values.length; i++){ - oneValue += values[i]; - if (i+1 < values.length) oneValue += "';'"; + oneValue.append(values[i]); + if (i+1 < values.length) oneValue.append("';'"); } - oneValue += "']"; + oneValue.append("']"); } out.println("--------"); out.println(" Name: '" + ps.Name + "' contains String[]:"); - out.println(oneValue); + out.println(oneValue.toString()); out.println("--------"); } else if (ps.Value instanceof PropertyValue){ |