From ccdd9f5a3ee239aed4d30ebd219992c49207a3b2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 30 Dec 2015 14:33:40 +0000 Subject: coverity#1326983 SBSC: String concatenation in loop using + operator Change-Id: Idefe2159ba5becbb7aaa5f28a422d80e29595708 --- qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qadevOOo') diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java index 6328614a98e6..c07c93b644de 100644 --- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java @@ -298,7 +298,7 @@ public class _XMultiPropertySet extends MultiMethodTest { //Get the properties being tested private void getPropsToTest(Property[] properties) { - String bound = ""; + StringBuilder sb = new StringBuilder(); for (int i = 0; i < properties.length; i++) { @@ -322,11 +322,13 @@ public class _XMultiPropertySet extends MultiMethodTest { boolean isVoid = util.utils.isVoid(values[0]); if ( isWritable && isNotNull && isBound && !isExcluded && !isVoid) { - bound+=name+";"; + sb.append(name + ";"); } } // endfor + String bound = sb.toString(); + //get a array of bound properties if (bound.equals("")) bound = "none"; StringTokenizer ST=new StringTokenizer(bound,";"); -- cgit