summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cmscore/profile
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2012-05-18 16:12:17 -0400
committerAde Lee <alee@redhat.com>2012-05-24 23:08:51 -0400
commit9db76ed1d1f8969e93aaff320e49662f53688e2e (patch)
tree2e7af87ca0f72cdf4eb982764757d2884b21ce7b /base/common/src/com/netscape/cmscore/profile
parenta4db0f39e257950a5c89203452c1184c7080e5bd (diff)
downloadpki-9db76ed1d1f8969e93aaff320e49662f53688e2e.tar.gz
pki-9db76ed1d1f8969e93aaff320e49662f53688e2e.tar.xz
pki-9db76ed1d1f8969e93aaff320e49662f53688e2e.zip
Fixes for Coverity Defects of Category : FB.SBSC_USE_STRINGBUFFER_CONCATENATION
Diffstat (limited to 'base/common/src/com/netscape/cmscore/profile')
-rw-r--r--base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java b/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
index c5a12447a..1be949183 100644
--- a/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
+++ b/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
@@ -154,19 +154,19 @@ public class ProfileSubsystem implements IProfileSubsystem {
}
StringTokenizer tokenizer = new StringTokenizer(ids, ",");
- String list = "";
+ StringBuffer list = new StringBuffer();
while (tokenizer.hasMoreTokens()) {
String element = tokenizer.nextToken();
if (!element.equals(id)) {
- list = list + element + ",";
+ list.append(element).append(",");
}
}
- if (!list.equals(""))
- list = list.substring(0, list.length() - 1);
+ if (list.length() != 0)
+ list.deleteCharAt(list.length() - 1);
- mConfig.putString(PROP_LIST, list);
+ mConfig.putString(PROP_LIST, list.toString());
mConfig.removeSubStore(id);
File file1 = new File(configPath);