summaryrefslogtreecommitdiffstats
path: root/base/common
diff options
context:
space:
mode:
Diffstat (limited to 'base/common')
-rw-r--r--base/common/src/com/netscape/certsrv/acls/ACLEntry.java2
-rw-r--r--base/common/src/com/netscape/certsrv/base/MetaInfo.java4
-rw-r--r--base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java2
-rw-r--r--base/common/src/com/netscape/cmscore/cert/PrettyPrintFormat.java3
-rw-r--r--base/common/src/com/netscape/cmscore/dbs/CertRecord.java3
-rw-r--r--base/common/src/com/netscape/cmscore/dbs/DBRegistry.java1
-rw-r--r--base/common/src/com/netscape/cmscore/ldap/LdapRule.java15
-rw-r--r--base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java6
-rw-r--r--base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java2
-rw-r--r--base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java4
-rw-r--r--base/common/src/com/netscape/cmscore/security/JssSubsystem.java10
-rw-r--r--base/common/src/com/netscape/cmscore/security/PWsdrCache.java7
-rw-r--r--base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java3
13 files changed, 29 insertions, 33 deletions
diff --git a/base/common/src/com/netscape/certsrv/acls/ACLEntry.java b/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
index 76924ed93..ca08fb551 100644
--- a/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
+++ b/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
@@ -239,7 +239,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
if (e.hasMoreElements())
entry.append(",");
}
- entry.append(") ").append(getAttributeExpressions());
+ entry.append(") " + getAttributeExpressions());
return entry.toString();
}
}
diff --git a/base/common/src/com/netscape/certsrv/base/MetaInfo.java b/base/common/src/com/netscape/certsrv/base/MetaInfo.java
index 64f9fe821..514c5c64e 100644
--- a/base/common/src/com/netscape/certsrv/base/MetaInfo.java
+++ b/base/common/src/com/netscape/certsrv/base/MetaInfo.java
@@ -53,10 +53,8 @@ public class MetaInfo implements IAttrSet {
* @return information about this certificate attribute.
*/
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuffer sb = new StringBuffer("[\n" + " Meta information:\n");
- sb.append("[\n");
- sb.append(" Meta information:\n");
Enumeration<String> enum1 = content.keys();
while (enum1.hasMoreElements()) {
diff --git a/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java b/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
index 0d1ab7eb5..7d06ee5ae 100644
--- a/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
+++ b/base/common/src/com/netscape/cms/servlet/admin/PublisherAdminServlet.java
@@ -3016,7 +3016,7 @@ public class PublisherAdminServlet extends AdminServlet {
StringBuffer buffer = new StringBuffer(s[0]);
if (s.length > 1) {
for (int i = 1; i < s.length; i++) {
- buffer.append(delimiter).append(s[i].trim());
+ buffer.append(delimiter + s[i].trim());
}
}
return buffer.toString();
diff --git a/base/common/src/com/netscape/cmscore/cert/PrettyPrintFormat.java b/base/common/src/com/netscape/cmscore/cert/PrettyPrintFormat.java
index 7b7ce64f9..60bc8c8f6 100644
--- a/base/common/src/com/netscape/cmscore/cert/PrettyPrintFormat.java
+++ b/base/common/src/com/netscape/cmscore/cert/PrettyPrintFormat.java
@@ -107,7 +107,7 @@ public class PrettyPrintFormat implements IPrettyPrintFormat {
if (in == null) return "";
- StringBuffer sb = new StringBuffer();
+ StringBuffer sb = new StringBuffer(indent(indentSize));
int hexCount = 0;
char c[];
int j = 0;
@@ -120,7 +120,6 @@ public class PrettyPrintFormat implements IPrettyPrintFormat {
char sep = separator.charAt(0);
- sb.append(indent(indentSize));
for (int i = 0; i < in.length; i++) {
if (lineLen > 0 && hexCount == lineLen) {
c[j++] = '\n';
diff --git a/base/common/src/com/netscape/cmscore/dbs/CertRecord.java b/base/common/src/com/netscape/cmscore/dbs/CertRecord.java
index b70c8cd36..422d506d5 100644
--- a/base/common/src/com/netscape/cmscore/dbs/CertRecord.java
+++ b/base/common/src/com/netscape/cmscore/dbs/CertRecord.java
@@ -274,9 +274,8 @@ public class CertRecord implements IDBObj, ICertRecord {
* String representation
*/
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuffer buf = new StringBuffer("CertRecord: ");
- buf.append("CertRecord: ");
if (getSerialNumber() != null)
buf.append(" " + getSerialNumber().toString());
return buf.toString();
diff --git a/base/common/src/com/netscape/cmscore/dbs/DBRegistry.java b/base/common/src/com/netscape/cmscore/dbs/DBRegistry.java
index 250ebf394..63b00b6bf 100644
--- a/base/common/src/com/netscape/cmscore/dbs/DBRegistry.java
+++ b/base/common/src/com/netscape/cmscore/dbs/DBRegistry.java
@@ -272,6 +272,7 @@ public class DBRegistry implements IDBRegistry, ISubsystem {
*/
private String inStringFormat(Vector<String> v){
StringBuffer result = new StringBuffer();
+
for (int i = 0; i < v.size(); i++) {
result.append(v.elementAt(i));
}
diff --git a/base/common/src/com/netscape/cmscore/ldap/LdapRule.java b/base/common/src/com/netscape/cmscore/ldap/LdapRule.java
index eaf5e763a..2fb148492 100644
--- a/base/common/src/com/netscape/cmscore/ldap/LdapRule.java
+++ b/base/common/src/com/netscape/cmscore/ldap/LdapRule.java
@@ -66,20 +66,20 @@ public class LdapRule implements ILdapRule, IExtendedPluginInfo {
mProcessor = processor;
Enumeration<String> mappers = mProcessor.getMapperInsts().keys();
Enumeration<String> publishers = mProcessor.getPublisherInsts().keys();
- StringBuffer map=new StringBuffer();
+ StringBuffer map = new StringBuffer();
map.append(NOMAPPER);
for (; mappers.hasMoreElements();) {
String name = mappers.nextElement();
- map.append(",").append(name);
+ map.append("," + name);
}
StringBuffer publish = new StringBuffer();
for (; publishers.hasMoreElements();) {
String name = publishers.nextElement();
- publish.append(",").append(name);
+ publish.append("," + name);
}
epi_params = new String[] {
@@ -176,21 +176,20 @@ public class LdapRule implements ILdapRule, IExtendedPluginInfo {
*
* Enumeration<String> mappers = mProcessor.getMapperInsts().keys();
Enumeration<String> publishers = mProcessor.getPublisherInsts().keys();
- StringBuffer map=new StringBuffer();
+ StringBuffer map = new StringBuffer();
map.append(NOMAPPER);
for (; mappers.hasMoreElements();) {
String name = mappers.nextElement();
- map.append(",").append(name);
+ map.append("," + name);
}
- StringBuffer publish=new StringBuffer();
-
+ StringBuffer publish = new StringBuffer();
for (; publishers.hasMoreElements();) {
String name = publishers.nextElement();
- publish.append(",").append(name);
+ publish.append("," + name);
}*/
/*
diff --git a/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java b/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
index e5aef45a5..62e4b8bef 100644
--- a/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
+++ b/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java
@@ -955,7 +955,7 @@ public class PublisherProcessor implements
// continue publishing even publisher has errors
//log(ILogger.LL_WARN, e.toString());
error = true;
- errorRule.append(" ").append(rule.getInstanceName());
+ errorRule.append(" " + rule.getInstanceName());
}
}
@@ -1072,7 +1072,7 @@ public class PublisherProcessor implements
// continue publishing even publisher has errors
//log(ILogger.LL_WARN, e.toString());
error = true;
- errorRule.append(" ").append(rule.getInstanceName());
+ errorRule.append(" " + rule.getInstanceName());
}
}
// set the ldap published flag.
@@ -1138,7 +1138,7 @@ public class PublisherProcessor implements
// continue publishing even publisher has errors
//log(ILogger.LL_WARN, e.toString());
error = true;
- errorRule.append(" ").append(rule.getInstanceName());
+ errorRule.append(" " + rule.getInstanceName());
}
}
diff --git a/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java b/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
index 1be949183..53d4fa14a 100644
--- a/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
+++ b/base/common/src/com/netscape/cmscore/profile/ProfileSubsystem.java
@@ -160,7 +160,7 @@ public class ProfileSubsystem implements IProfileSubsystem {
String element = tokenizer.nextToken();
if (!element.equals(id)) {
- list.append(element).append(",");
+ list.append(element + ",");
}
}
if (list.length() != 0)
diff --git a/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java b/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java
index 685c1e5f4..abd27fddf 100644
--- a/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java
+++ b/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java
@@ -495,7 +495,7 @@ public class PKIJNDIRealm extends JNDIRealm {
if (orIndex == -1 && andIndex == -1) {
boolean passed = evaluateExpression(principal, s.trim());
- v.addElement(passed);
+ v.addElement(Boolean.valueOf(passed));
break;
// || first
@@ -511,7 +511,7 @@ public class PKIJNDIRealm extends JNDIRealm {
String s1 = s.substring(0, andIndex);
boolean passed = evaluateExpression(principal, s1.trim());
- v.addElement(passed);
+ v.addElement(Boolean.valueOf(passed));
v.addElement("&&");
s = s.substring(andIndex + 2);
}
diff --git a/base/common/src/com/netscape/cmscore/security/JssSubsystem.java b/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
index 2d6fe7d88..12bf8d95a 100644
--- a/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
+++ b/base/common/src/com/netscape/cmscore/security/JssSubsystem.java
@@ -539,7 +539,7 @@ public final class JssSubsystem implements ICryptoSubsystem {
if (tokenList.length()==0)
return Constants.PR_INTERNAL_TOKEN;
else
- return tokenList.append(",").append(Constants.PR_INTERNAL_TOKEN).toString();
+ return tokenList.append("," + Constants.PR_INTERNAL_TOKEN).toString();
}
public boolean isTokenLoggedIn(String name) throws EBaseException {
@@ -610,9 +610,11 @@ public final class JssSubsystem implements ICryptoSubsystem {
for (int i = 0; i < list.length; i++) {
String nickname = list[i].getNickname();
- if (i > 0)
- certNames.append(",");
- certNames.append(nickname);
+ if (certNames.length() < 1) {
+ certNames.append(nickname);
+ } else {
+ certNames.append("," + nickname);
+ }
}
}
} catch (TokenException e) {
diff --git a/base/common/src/com/netscape/cmscore/security/PWsdrCache.java b/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
index e4e8a432b..17cc9f0a7 100644
--- a/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
+++ b/base/common/src/com/netscape/cmscore/security/PWsdrCache.java
@@ -230,13 +230,12 @@ public class PWsdrCache {
* add passwd in pwcache.
*/
public void addEntry(String tag, String pwd, Hashtable<String, String> tagPwds) throws EBaseException {
-
StringBuffer stringToAdd = new StringBuffer();
String bufs = null;
if (tagPwds == null) {
- stringToAdd.append(tag + ":" + pwd + System.getProperty("line.separator"));
+ stringToAdd.append(tag + ":" + pwd + "\n");
} else {
Enumeration<String> enum1 = tagPwds.keys();
@@ -245,7 +244,7 @@ public class PWsdrCache {
pwd = tagPwds.get(tag);
debug("password tag: " + tag + " stored in " + mPWcachedb);
- stringToAdd.append(tag + ":" + pwd + System.getProperty("line.separator"));
+ stringToAdd.append(tag + ":" + pwd + "\n");
}
}
@@ -438,7 +437,7 @@ public class PWsdrCache {
while (enum1.hasMoreElements()) {
String tag = enum1.nextElement();
String pwd = ht.get(tag);
- returnString.append(tag + ":" + pwd + System.getProperty("line.separator"));
+ returnString.append(tag + ":" + pwd + "\n");
}
return returnString.toString();
}
diff --git a/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java b/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
index 382cc249c..7cca70002 100644
--- a/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
+++ b/base/common/src/com/netscape/cmscore/usrgrp/UGSubsystem.java
@@ -275,8 +275,7 @@ public final class UGSubsystem implements IUGSubsystem {
hasSlash = up.indexOf('\\');
while (hasSlash != -1) {
- stripped.append(up.substring(0, hasSlash)).append(
- "\\5c");
+ stripped.append(up.substring(0, hasSlash) + "\\5c");
up = up.substring(hasSlash + 1);
hasSlash = up.indexOf('\\');