From 1c925e49a365cec690f3a63a4b8cf89d85621df8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 30 Dec 2015 14:26:33 +0000 Subject: coverity#1326985 SBSC: String concatenation in loop using + operator Change-Id: I05d12ace635cc780e59a02d79265ac057cb07c0f --- qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qadevOOo/tests') diff --git a/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java b/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java index b7ce48c70758..2031ca3c3e86 100644 --- a/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java +++ b/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java @@ -189,19 +189,19 @@ public class _XDocumentTemplates extends MultiMethodTest { */ protected String getContentList(XContent content) { XResultSet statRes = getStatResultSet(content); - String ret = ""; + StringBuilder ret = new StringBuilder(); try { statRes.first(); XRow row = UnoRuntime.queryInterface(XRow.class, statRes); while(! statRes.isAfterLast()) { - ret += "\n " + row.getString(1); + ret.append("\n ").append(row.getString(1)); statRes.next(); } } catch (com.sun.star.sdbc.SQLException e) { log.println("Exception occurred:" + e); } - return ret; + return ret.toString(); } protected XResultSet getStatResultSet(XContent content) { -- cgit