diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:54:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:54:53 +0000 |
commit | e3ac546730bc5748427f8dbca443662c63545cd9 (patch) | |
tree | a5d4364e508d40542ef5f48050663a98e9a78e45 /qadevOOo/tests/java/mod | |
parent | a99bae57261d6410a6188fbc7ff27486e3ca5923 (diff) |
coverity#1326992 SBSC: String concatenation in loop using + operator
Change-Id: Ia36048489c3e8ac131c7e20701f5b18270156c2a
Diffstat (limited to 'qadevOOo/tests/java/mod')
-rw-r--r-- | qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetFactory.java | 8 |
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) ; |