summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-30 13:57:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-30 13:57:36 +0000
commit09da6a11b4c8b01028fd1da17d83a5ee1c59b4ad (patch)
treecbff0828caabae886dc8d1c84e38478e508b3e83 /qadevOOo
parente3ac546730bc5748427f8dbca443662c63545cd9 (diff)
coverity#1326991 SBSC: String concatenation in loop using + operator
Change-Id: I0b81716a1bdd2ef91bbc7280c92713afe0fbab18
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/tests/java/mod/_cached/CachedContentResultSetStubFactory.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/mod/_cached/CachedContentResultSetStubFactory.java b/qadevOOo/tests/java/mod/_cached/CachedContentResultSetStubFactory.java
index e4a6a364757c..9e7a557d13ef 100644
--- a/qadevOOo/tests/java/mod/_cached/CachedContentResultSetStubFactory.java
+++ b/qadevOOo/tests/java/mod/_cached/CachedContentResultSetStubFactory.java
@@ -93,19 +93,19 @@ public class CachedContentResultSetStubFactory 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() + "/" ;
log.println("Getting Content of '" + cntUrl + "'") ;
XContentIdentifier CI = ciFac.createContentIdentifier(cntUrl) ;