diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:51:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-30 14:51:25 +0000 |
commit | f852edc6db76ee8569374bd1997a579201a5493a (patch) | |
tree | 374c6294c6f6144b3cf233f7b7d5ce82644adb36 /qadevOOo | |
parent | f6fd796b779c81330e8657140001134f03e6cc29 (diff) |
coverity#1326974 SBSC: String concatenation in loop using + operator
Change-Id: Ic1130017c02a470ebd213704ad5c56b6747dfee0
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/helper/APIDescGetter.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qadevOOo/runner/helper/APIDescGetter.java b/qadevOOo/runner/helper/APIDescGetter.java index 19fdaacf4704..0320fb581bf6 100644 --- a/qadevOOo/runner/helper/APIDescGetter.java +++ b/qadevOOo/runner/helper/APIDescGetter.java @@ -392,7 +392,6 @@ public class APIDescGetter extends DescGetter private static String createClassName(String _ifc_name) { StringTokenizer st = new StringTokenizer(_ifc_name, ":"); - String className = ""; int count = 3; @@ -401,6 +400,8 @@ public class APIDescGetter extends DescGetter count = 4; } + StringBuilder className = new StringBuilder(); + for (int i = 0; st.hasMoreTokens(); i++) { String token = st.nextToken(); @@ -414,10 +415,10 @@ public class APIDescGetter extends DescGetter token = "_" + token; } - className += ("." + token); + className.append(".").append(token); } } - return className; + return className.toString(); } private static String entryType; |