summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java')
-rw-r--r--base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java b/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
index 396067c79..2b9bca3d5 100644
--- a/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
+++ b/base/common/src/com/netscape/cmscore/dbs/RevocationInfoMapper.java
@@ -66,11 +66,12 @@ public class RevocationInfoMapper implements IDBAttrMapper {
throws EBaseException {
try {
// in format of <date>;<extensions>
- String value = "";
+ StringBuffer value = new StringBuffer();
+
RevocationInfo info = (RevocationInfo) obj;
Date d = info.getRevocationDate();
- value = DateMapper.dateToDB(d);
+ value.append(DateMapper.dateToDB(d));
CRLExtensions exts = info.getCRLEntryExtensions();
// CRLExtension's DER encoding and decoding does not work!
// That is why we need to do our own serialization.
@@ -83,20 +84,20 @@ public class RevocationInfoMapper implements IDBAttrMapper {
RevocationReason reason =
((CRLReasonExtension) ext).getReason();
- value = value + ";CRLReasonExtension=" +
- Integer.toString(reason.toInt());
+ value.append(";CRLReasonExtension=" +
+ Integer.toString(reason.toInt()));
} else if (ext instanceof InvalidityDateExtension) {
Date invalidityDate =
((InvalidityDateExtension) ext).getInvalidityDate();
- value = value + ";InvalidityDateExtension=" +
- DateMapper.dateToDB(invalidityDate);
+ value.append(";InvalidityDateExtension=" +
+ DateMapper.dateToDB(invalidityDate));
} else {
Debug.trace("XXX skipped extension");
}
}
attrs.add(new LDAPAttribute(CertDBSchema.LDAP_ATTR_REVO_INFO,
- value));
+ value.toString()));
} catch (Exception e) {
Debug.trace(e.toString());
throw new EDBException(