diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:47:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:47:10 +0000 |
commit | 9c0539ad409f2f82076f8b37b9ab9fb6b7594444 (patch) | |
tree | 242fd6795b51074172b7466ef82276f221286edc /qadevOOo | |
parent | bc353749e6be7906127e1f11b3802c462e19729c (diff) |
coverity#1326977 SBSC: String concatenation in loop using + operator
Change-Id: Ib92a893fc5c3cc89ce78733b95406d5ec415cb26
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/stats/Summarizer.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/qadevOOo/runner/stats/Summarizer.java b/qadevOOo/runner/stats/Summarizer.java index ced7e3c8649c..36addd5e6dfd 100644 --- a/qadevOOo/runner/stats/Summarizer.java +++ b/qadevOOo/runner/stats/Summarizer.java @@ -63,7 +63,7 @@ public class Summarizer } if (failures.size() > 0) { - String errMsg = ""; + StringBuilder errMsg = new StringBuilder(); String state = "COMPLETED.FAILED"; for (int j = 0; j < failures.size(); j++) { @@ -73,12 +73,11 @@ public class Summarizer } else { - errMsg += - failures.get(j) + " - " + states.get(j) + "\r\n"; + errMsg.append(failures.get(j)).append(" - ").append(states.get(j)).append("\r\n"); } } entry.hasErrorMsg = true; - entry.ErrorMsg = errMsg; + entry.ErrorMsg = errMsg.toString(); entry.State = state; } else if (entry.EntryType.equals("component") && knownIssues > 0) |