summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-30 13:54:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-30 13:54:53 +0000
commite3ac546730bc5748427f8dbca443662c63545cd9 (patch)
treea5d4364e508d40542ef5f48050663a98e9a78e45 /qadevOOo
parenta99bae57261d6410a6188fbc7ff27486e3ca5923 (diff)
coverity#1326992 SBSC: String concatenation in loop using + operator
Change-Id: Ia36048489c3e8ac131c7e20701f5b18270156c2a
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetFactory.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetFactory.java b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetFactory.java
index d2435b99fd17..87d13d6d36c4 100644
--- a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetFactory.java
+++ b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetFactory.java
@@ -93,19 +93,19 @@ public class CachedDynamicResultSetFactory extends TestCase {
XContentIdentifierFactory ciFac = UnoRuntime.queryInterface(XContentIdentifierFactory.class, oUCB) ;
String url = util.utils.getFullTestURL("SwXTextEmbeddedObject.sxw") ;
- String escUrl = "" ;
+ StringBuilder escUrl = new StringBuilder();
// In base URL of a JAR file in content URL all directory
// separators ('/') must be replaced with escape symbol '%2F'.
int idx = url.indexOf("/") ;
int lastIdx = -1 ;
while (idx >= 0) {
- escUrl += url.substring(lastIdx + 1, idx) + "%2F" ;
+ escUrl.append(url.substring(lastIdx + 1, idx)).append("%2F");
lastIdx = idx ;
idx = url.indexOf("/", idx + 1) ;
}
- escUrl += url.substring(lastIdx + 1) ;
- String cntUrl = "vnd.sun.star.pkg://" + escUrl + "/" ;
+ escUrl.append(url.substring(lastIdx + 1));
+ String cntUrl = "vnd.sun.star.pkg://" + escUrl.toString() + "/" ;
XContentIdentifier CI = ciFac.createContentIdentifier(cntUrl) ;