diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:59:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:59:45 +0000 |
commit | 1d3abcb04397b521a91446ecfd3e46c9c49e0e39 (patch) | |
tree | 008d446e28ca4cd9fd479a5015f1c7fa2b2a62c3 /qadevOOo/tests/java/mod | |
parent | 09da6a11b4c8b01028fd1da17d83a5ee1c59b4ad (diff) |
coverity#1326990 SBSC: String concatenation in loop using + operator
Change-Id: I401d93ac2527409e44f908984632232768b1e4c0
Diffstat (limited to 'qadevOOo/tests/java/mod')
-rw-r--r-- | qadevOOo/tests/java/mod/_cached/CachedContentResultSetFactory.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/mod/_cached/CachedContentResultSetFactory.java b/qadevOOo/tests/java/mod/_cached/CachedContentResultSetFactory.java index f54370a0c0cb..89d57f1e9234 100644 --- a/qadevOOo/tests/java/mod/_cached/CachedContentResultSetFactory.java +++ b/qadevOOo/tests/java/mod/_cached/CachedContentResultSetFactory.java @@ -95,19 +95,19 @@ public class CachedContentResultSetFactory 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) ; |