From 9c0539ad409f2f82076f8b37b9ab9fb6b7594444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 30 Dec 2015 14:47:10 +0000 Subject: [PATCH] coverity#1326977 SBSC: String concatenation in loop using + operator Change-Id: Ib92a893fc5c3cc89ce78733b95406d5ec415cb26 --- qadevOOo/runner/stats/Summarizer.java | 7 +++---- 1 file 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)