From 946421516119aca471ff4f08d66a53b5d3a9d1b9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 30 Dec 2015 14:31:56 +0000 Subject: coverity#1326984 SBSC: String concatenation in loop using + operator Change-Id: Ib3eddf6c121c462a09c7db310921f4f619c80b5a --- .../java/ifc/form/validation/_XValidatableFormComponent.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'qadevOOo') diff --git a/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java b/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java index a3008c2543c3..ebc0d985a8e1 100644 --- a/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java +++ b/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java @@ -150,7 +150,7 @@ public class _XValidatableFormComponent 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++) { @@ -175,7 +175,7 @@ public class _XValidatableFormComponent extends MultiMethodTest || name.equals("Date") ) { - bound = (name + ";"); + sb = new StringBuilder(name + ";"); } if ( @@ -183,9 +183,11 @@ public class _XValidatableFormComponent extends MultiMethodTest && !name.equals("Enabled") ) { - bound += (name + ";"); + sb.append(name + ";"); } } + + String bound = sb.toString(); // endfor //get a array of bound properties -- cgit