diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:52:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 13:52:41 +0000 |
commit | a99bae57261d6410a6188fbc7ff27486e3ca5923 (patch) | |
tree | bc8fb1b893e3bdfabdd11b5cfd24c66f68f7a7b9 /qadevOOo/tests/java | |
parent | 4d4114668e130f60bcecfa50bf0708362f5d4261 (diff) |
coverity#1326993 SBSC: String concatenation in loop using + operator
Change-Id: Ie29933018d22b6a936a429b2fd38b05b3959d8e9
Diffstat (limited to 'qadevOOo/tests/java')
-rw-r--r-- | qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java index a0245b7250a3..5249b8e26096 100644 --- a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java +++ b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java @@ -90,19 +90,19 @@ public class CachedDynamicResultSetStubFactory 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) ; |