summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2012-05-18 12:18:11 -0400
committerAde Lee <alee@redhat.com>2012-05-24 23:08:19 -0400
commit307199314968b85059de62fbb694bd62b2502f46 (patch)
tree3467319c62253cb0dcc10edfd777e1fef1bdc51d
parenta6fca9587905f455c4b0306b02d77334a295305e (diff)
downloadpki-307199314968b85059de62fbb694bd62b2502f46.tar.gz
pki-307199314968b85059de62fbb694bd62b2502f46.tar.xz
pki-307199314968b85059de62fbb694bd62b2502f46.zip
Fixes for Coverity Defects of Category : FB.DM_BOOLEAN_CTOR
-rw-r--r--base/common/src/com/netscape/cmscore/base/ArgBlock.java6
-rw-r--r--base/common/src/com/netscape/cmscore/extensions/KeyUsage.java2
-rw-r--r--base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java2
-rw-r--r--base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java2
-rw-r--r--base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnection.java2
-rw-r--r--base/common/src/com/netscape/cmscore/policy/SimpleExpression.java2
-rw-r--r--base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java25
-rw-r--r--base/common/src/com/netscape/cmscore/security/CASigningCert.java8
-rw-r--r--base/common/src/com/netscape/cmscore/security/KRATransportCert.java2
-rw-r--r--base/common/src/com/netscape/cmscore/security/KeyCertUtil.java14
-rw-r--r--base/common/src/com/netscape/cmscore/security/OCSPSigningCert.java8
-rw-r--r--base/common/src/com/netscape/cmscore/security/RASigningCert.java2
-rw-r--r--base/common/src/com/netscape/cmscore/security/SSLCert.java8
-rw-r--r--base/common/src/com/netscape/cmscore/security/SSLSelfSignedCert.java6
-rw-r--r--base/common/src/com/netscape/cmscore/security/SubsystemCert.java6
-rw-r--r--base/util/src/netscape/security/extensions/NSCertTypeExtension.java2
-rw-r--r--base/util/src/netscape/security/extensions/PresenceServerExtension.java2
-rw-r--r--base/util/src/netscape/security/x509/BasicConstraintsExtension.java2
-rwxr-xr-xbase/util/src/netscape/security/x509/CRLExtensions.java2
-rw-r--r--base/util/src/netscape/security/x509/CertificateExtensions.java2
-rw-r--r--base/util/src/netscape/security/x509/Extensions.java2
-rw-r--r--base/util/src/netscape/security/x509/KeyUsageExtension.java18
-rwxr-xr-xbase/util/src/netscape/security/x509/ReasonFlags.java18
23 files changed, 69 insertions, 74 deletions
diff --git a/base/common/src/com/netscape/cmscore/base/ArgBlock.java b/base/common/src/com/netscape/cmscore/base/ArgBlock.java
index 889ad123e..7b7e42a0f 100644
--- a/base/common/src/com/netscape/cmscore/base/ArgBlock.java
+++ b/base/common/src/com/netscape/cmscore/base/ArgBlock.java
@@ -592,11 +592,7 @@ public class ArgBlock implements IArgBlock {
* @return value
*/
public Object addBooleanValue(String n, boolean v) {
- if (v) {
- return mArgs.put(n, new Boolean("true"));
- } else {
- return mArgs.put(n, new Boolean("false"));
- }
+ return mArgs.put(n, Boolean.valueOf(v));
}
/**
diff --git a/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java b/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java
index 41038d898..c5487de31 100644
--- a/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java
+++ b/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java
@@ -194,7 +194,7 @@ public class KeyUsage implements ICMSExtension {
try {
byte[] value = extension.getExtensionValue();
- ext = new KeyUsageExtension(new Boolean(true), value);
+ ext = new KeyUsageExtension(Boolean.valueOf(true), value);
} catch (IOException e) {
return null;
}
diff --git a/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java b/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java
index 4be580cbc..9a326b25e 100644
--- a/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java
+++ b/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java
@@ -309,7 +309,7 @@ public class LdapSimpleExpression implements ILdapExpression {
if (!(mVal.equalsIgnoreCase("true") || mVal.equalsIgnoreCase("false")))
throw new ELdapException(CMS.getUserMessage("CMS_LDAP_INVALID_ATTR_VALUE",
mVal));
- storedVal = new Boolean(mVal);
+ storedVal = Boolean.valueOf(mVal);
switch (mOp) {
case OP_EQUAL:
result = (givenVal.equals(storedVal));
diff --git a/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java b/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java
index a0d9b2466..f99705e84 100644
--- a/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java
+++ b/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java
@@ -46,7 +46,7 @@ public class LdapAnonConnection extends LDAPConnection {
// rebind info is also anonymous.
boolean followReferrals = connInfo.getFollowReferrals();
- setOption(LDAPv2.REFERRALS, new Boolean(followReferrals));
+ setOption(LDAPv2.REFERRALS, Boolean.valueOf(followReferrals));
super.connect(connInfo.getVersion(),
connInfo.getHost(), connInfo.getPort(), null, null);
diff --git a/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnection.java b/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnection.java
index 1ce2eeefb..787967a5f 100644
--- a/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnection.java
+++ b/base/common/src/com/netscape/cmscore/ldapconn/LdapBoundConnection.java
@@ -67,7 +67,7 @@ public class LdapBoundConnection extends LDAPConnection {
boolean followReferrals = connInfo.getFollowReferrals();
- setOption(LDAPv2.REFERRALS, new Boolean(followReferrals));
+ setOption(LDAPv2.REFERRALS,Boolean.valueOf(followReferrals));
if (followReferrals &&
authInfo.getAuthType() != LdapAuthInfo.LDAP_AUTHTYPE_SSLCLIENTAUTH) {
LDAPRebind rebindInfo =
diff --git a/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java b/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java
index 97b75fa4f..4f8f0eb9a 100644
--- a/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java
+++ b/base/common/src/com/netscape/cmscore/policy/SimpleExpression.java
@@ -270,7 +270,7 @@ public class SimpleExpression implements IExpression {
if (!(mVal.equalsIgnoreCase("true") || mVal.equalsIgnoreCase("false")))
throw new EPolicyException(CMS.getUserMessage("CMS_POLICY_INVALID_ATTR_VALUE",
mVal));
- storedVal = new Boolean(mVal);
+ storedVal = Boolean.valueOf(mVal);
switch (mOp) {
case OP_EQUAL:
result = (givenVal.equals(storedVal));
diff --git a/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java b/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java
index a112cdbcc..685c1e5f4 100644
--- a/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java
+++ b/base/common/src/com/netscape/cmscore/realm/PKIJNDIRealm.java
@@ -3,16 +3,9 @@ package com.netscape.cmscore.realm;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.security.Principal;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
-import java.security.Principal;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.connector.Request;
-import org.apache.catalina.connector.Response;
-import org.apache.catalina.deploy.SecurityConstraint;
-import org.apache.catalina.realm.JNDIRealm;
-
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
@@ -23,13 +16,19 @@ import java.util.Vector;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.PartialResultException;
-import javax.naming.directory.DirContext;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import javax.servlet.http.HttpServletResponse;
+import org.apache.catalina.Context;
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.catalina.deploy.SecurityConstraint;
+import org.apache.catalina.realm.JNDIRealm;
+
/*
* Self contained PKI JNDI Real that overrides the standard JNDI Realm
*
@@ -384,7 +383,7 @@ public class PKIJNDIRealm extends JNDIRealm {
if (isEntryNegative) {
allowed = !allowed;
}
-
+
// Our current ACLs require that every entry passes for
// the entire ACL to pass.
// For some reason the original code allows the negative acls (deny)
@@ -496,7 +495,7 @@ public class PKIJNDIRealm extends JNDIRealm {
if (orIndex == -1 && andIndex == -1) {
boolean passed = evaluateExpression(principal, s.trim());
- v.addElement(Boolean.valueOf(passed));
+ v.addElement(passed);
break;
// || first
@@ -504,7 +503,7 @@ public class PKIJNDIRealm extends JNDIRealm {
String s1 = s.substring(0, orIndex);
boolean passed = evaluateExpression(principal, s1.trim());
- v.addElement(new Boolean(passed));
+ v.addElement(Boolean.valueOf(passed));
v.addElement("||");
s = s.substring(orIndex + 2);
// && first
@@ -512,7 +511,7 @@ public class PKIJNDIRealm extends JNDIRealm {
String s1 = s.substring(0, andIndex);
boolean passed = evaluateExpression(principal, s1.trim());
- v.addElement(new Boolean(passed));
+ v.addElement(passed);
v.addElement("&&");
s = s.substring(andIndex + 2);
}
diff --git a/base/common/src/com/netscape/cmscore/security/CASigningCert.java b/base/common/src/com/netscape/cmscore/security/CASigningCert.java
index 335bd9f37..8d35acf1b 100644
--- a/base/common/src/com/netscape/cmscore/security/CASigningCert.java
+++ b/base/common/src/com/netscape/cmscore/security/CASigningCert.java
@@ -153,10 +153,10 @@ public class CASigningCert extends CertificateInfo {
protected KeyUsageExtension getKeyUsageExtension() throws IOException {
KeyUsageExtension extension = new KeyUsageExtension();
- extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, new Boolean(true));
- extension.set(KeyUsageExtension.NON_REPUDIATION, new Boolean(true));
- extension.set(KeyUsageExtension.KEY_CERTSIGN, new Boolean(true));
- extension.set(KeyUsageExtension.CRL_SIGN, new Boolean(true));
+ extension.set(KeyUsageExtension.DIGITAL_SIGNATURE,Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.NON_REPUDIATION, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.KEY_CERTSIGN, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.CRL_SIGN, Boolean.valueOf(true));
return extension;
}
}
diff --git a/base/common/src/com/netscape/cmscore/security/KRATransportCert.java b/base/common/src/com/netscape/cmscore/security/KRATransportCert.java
index 7e2e2f90d..58c269796 100644
--- a/base/common/src/com/netscape/cmscore/security/KRATransportCert.java
+++ b/base/common/src/com/netscape/cmscore/security/KRATransportCert.java
@@ -95,7 +95,7 @@ public class KRATransportCert extends CertificateInfo {
protected KeyUsageExtension getKeyUsageExtension() throws IOException {
KeyUsageExtension extension = new KeyUsageExtension();
- extension.set(KeyUsageExtension.KEY_ENCIPHERMENT, new Boolean(true));
+ extension.set(KeyUsageExtension.KEY_ENCIPHERMENT,Boolean.valueOf(true));
return extension;
}
}
diff --git a/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java b/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
index ccbb004ce..7a980c621 100644
--- a/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
+++ b/base/common/src/com/netscape/cmscore/security/KeyCertUtil.java
@@ -909,49 +909,49 @@ public class KeyCertUtil {
String sslClient = properties.getSSLClientBit();
if ((sslClient != null) && (sslClient.equals(Constants.TRUE))) {
- ns.set(NSCertTypeExtension.SSL_CLIENT, new Boolean(true));
+ ns.set(NSCertTypeExtension.SSL_CLIENT, Boolean.valueOf(true));
anyExt = true;
}
String sslServer = properties.getSSLServerBit();
if ((sslServer != null) && (sslServer.equals(Constants.TRUE))) {
- ns.set(NSCertTypeExtension.SSL_SERVER, new Boolean(true));
+ ns.set(NSCertTypeExtension.SSL_SERVER, Boolean.valueOf(true));
anyExt = true;
}
String sslMail = properties.getSSLMailBit();
if ((sslMail != null) && (sslMail.equals(Constants.TRUE))) {
- ns.set(NSCertTypeExtension.EMAIL, new Boolean(true));
+ ns.set(NSCertTypeExtension.EMAIL, Boolean.valueOf(true));
anyExt = true;
}
String sslCA = properties.getSSLCABit();
if ((sslCA != null) && (sslCA.equals(Constants.TRUE))) {
- ns.set(NSCertTypeExtension.SSL_CA, new Boolean(true));
+ ns.set(NSCertTypeExtension.SSL_CA, Boolean.valueOf(true));
anyExt = true;
}
String objectSigning = properties.getObjectSigningBit();
if ((objectSigning != null) && (objectSigning.equals(Constants.TRUE))) {
- ns.set(NSCertTypeExtension.OBJECT_SIGNING, new Boolean(true));
+ ns.set(NSCertTypeExtension.OBJECT_SIGNING, Boolean.valueOf(true));
anyExt = true;
}
String mailCA = properties.getMailCABit();
if ((mailCA != null) && (mailCA.equals(Constants.TRUE))) {
- ns.set(NSCertTypeExtension.EMAIL_CA, new Boolean(true));
+ ns.set(NSCertTypeExtension.EMAIL_CA, Boolean.valueOf(true));
anyExt = true;
}
String objectSigningCA = properties.getObjectSigningCABit();
if ((objectSigningCA != null) && (objectSigningCA.equals(Constants.TRUE))) {
- ns.set(NSCertTypeExtension.OBJECT_SIGNING_CA, new Boolean(true));
+ ns.set(NSCertTypeExtension.OBJECT_SIGNING_CA, Boolean.valueOf(true));
anyExt = true;
}
if (anyExt)
diff --git a/base/common/src/com/netscape/cmscore/security/OCSPSigningCert.java b/base/common/src/com/netscape/cmscore/security/OCSPSigningCert.java
index 16ca08b80..07ae9ee2f 100644
--- a/base/common/src/com/netscape/cmscore/security/OCSPSigningCert.java
+++ b/base/common/src/com/netscape/cmscore/security/OCSPSigningCert.java
@@ -131,10 +131,10 @@ public class OCSPSigningCert extends CertificateInfo {
protected KeyUsageExtension getKeyUsageExtension() throws IOException {
KeyUsageExtension extension = new KeyUsageExtension();
- extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, new Boolean(true));
- extension.set(KeyUsageExtension.NON_REPUDIATION, new Boolean(true));
- extension.set(KeyUsageExtension.KEY_CERTSIGN, new Boolean(true));
- extension.set(KeyUsageExtension.CRL_SIGN, new Boolean(true));
+ extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.NON_REPUDIATION, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.KEY_CERTSIGN, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.CRL_SIGN, Boolean.valueOf(true));
return extension;
}
}
diff --git a/base/common/src/com/netscape/cmscore/security/RASigningCert.java b/base/common/src/com/netscape/cmscore/security/RASigningCert.java
index cf1de4203..51e05b5e9 100644
--- a/base/common/src/com/netscape/cmscore/security/RASigningCert.java
+++ b/base/common/src/com/netscape/cmscore/security/RASigningCert.java
@@ -101,7 +101,7 @@ public class RASigningCert extends CertificateInfo {
protected KeyUsageExtension getKeyUsageExtension() throws IOException {
KeyUsageExtension extension = new KeyUsageExtension();
- extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, new Boolean(true));
+ extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, Boolean.valueOf(true));
return extension;
}
}
diff --git a/base/common/src/com/netscape/cmscore/security/SSLCert.java b/base/common/src/com/netscape/cmscore/security/SSLCert.java
index 9dbec8abb..99b920c98 100644
--- a/base/common/src/com/netscape/cmscore/security/SSLCert.java
+++ b/base/common/src/com/netscape/cmscore/security/SSLCert.java
@@ -110,10 +110,10 @@ public class SSLCert extends CertificateInfo {
protected KeyUsageExtension getKeyUsageExtension() throws IOException {
KeyUsageExtension extension = new KeyUsageExtension();
- extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, new Boolean(true));
- extension.set(KeyUsageExtension.NON_REPUDIATION, new Boolean(true));
- extension.set(KeyUsageExtension.KEY_ENCIPHERMENT, new Boolean(true));
- extension.set(KeyUsageExtension.DATA_ENCIPHERMENT, new Boolean(true));
+ extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.NON_REPUDIATION, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.KEY_ENCIPHERMENT, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.DATA_ENCIPHERMENT, Boolean.valueOf(true));
return extension;
}
}
diff --git a/base/common/src/com/netscape/cmscore/security/SSLSelfSignedCert.java b/base/common/src/com/netscape/cmscore/security/SSLSelfSignedCert.java
index 328f6a86c..8cee1d155 100644
--- a/base/common/src/com/netscape/cmscore/security/SSLSelfSignedCert.java
+++ b/base/common/src/com/netscape/cmscore/security/SSLSelfSignedCert.java
@@ -105,9 +105,9 @@ public class SSLSelfSignedCert extends CertificateInfo {
protected KeyUsageExtension getKeyUsageExtension() throws IOException {
KeyUsageExtension extension = new KeyUsageExtension();
- extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, new Boolean(true));
- //extension.set(KeyUsageExtension.NON_REPUDIATION, new Boolean(true));
- extension.set(KeyUsageExtension.KEY_ENCIPHERMENT, new Boolean(true));
+ extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, Boolean.valueOf(true));
+ //extension.set(KeyUsageExtension.NON_REPUDIATION, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.KEY_ENCIPHERMENT, Boolean.valueOf(true));
return extension;
}
}
diff --git a/base/common/src/com/netscape/cmscore/security/SubsystemCert.java b/base/common/src/com/netscape/cmscore/security/SubsystemCert.java
index d0ce74490..5ad3e11f2 100644
--- a/base/common/src/com/netscape/cmscore/security/SubsystemCert.java
+++ b/base/common/src/com/netscape/cmscore/security/SubsystemCert.java
@@ -73,9 +73,9 @@ public class SubsystemCert extends CertificateInfo {
protected KeyUsageExtension getKeyUsageExtension() throws IOException {
KeyUsageExtension extension = new KeyUsageExtension();
- extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, new Boolean(true));
- extension.set(KeyUsageExtension.NON_REPUDIATION, new Boolean(true));
- extension.set(KeyUsageExtension.KEY_ENCIPHERMENT, new Boolean(true));
+ extension.set(KeyUsageExtension.DIGITAL_SIGNATURE, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.NON_REPUDIATION, Boolean.valueOf(true));
+ extension.set(KeyUsageExtension.KEY_ENCIPHERMENT, Boolean.valueOf(true));
return extension;
}
}
diff --git a/base/util/src/netscape/security/extensions/NSCertTypeExtension.java b/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
index f14d113c7..22197be9b 100644
--- a/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
+++ b/base/util/src/netscape/security/extensions/NSCertTypeExtension.java
@@ -274,7 +274,7 @@ public class NSCertTypeExtension extends Extension implements CertAttrSet {
* Get the attribute value.
*/
public Object get(String name) throws CertificateException {
- return new Boolean(isSet(getPosition(name)));
+ return Boolean.valueOf(isSet(getPosition(name)));
}
/**
diff --git a/base/util/src/netscape/security/extensions/PresenceServerExtension.java b/base/util/src/netscape/security/extensions/PresenceServerExtension.java
index e8fab049e..276c91547 100644
--- a/base/util/src/netscape/security/extensions/PresenceServerExtension.java
+++ b/base/util/src/netscape/security/extensions/PresenceServerExtension.java
@@ -314,7 +314,7 @@ public class PresenceServerExtension extends Extension implements CertAttrSet {
@SuppressWarnings("unused")
PresenceServerExtension ext2 = new PresenceServerExtension(
- new Boolean(false), ext1.getExtensionValue());
+ Boolean.valueOf(false), ext1.getExtensionValue());
}
}
diff --git a/base/util/src/netscape/security/x509/BasicConstraintsExtension.java b/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
index ed619cb1b..8f3a3c634 100644
--- a/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
+++ b/base/util/src/netscape/security/x509/BasicConstraintsExtension.java
@@ -251,7 +251,7 @@ public class BasicConstraintsExtension extends Extension
*/
public Object get(String name) throws IOException {
if (name.equalsIgnoreCase(IS_CA)) {
- return (new Boolean(ca));
+ return (Boolean.valueOf(ca));
} else if (name.equalsIgnoreCase(PATH_LEN)) {
return (Integer.valueOf(pathLen));
} else {
diff --git a/base/util/src/netscape/security/x509/CRLExtensions.java b/base/util/src/netscape/security/x509/CRLExtensions.java
index 3ebc72e41..60a6532ba 100755
--- a/base/util/src/netscape/security/x509/CRLExtensions.java
+++ b/base/util/src/netscape/security/x509/CRLExtensions.java
@@ -70,7 +70,7 @@ public class CRLExtensions extends Vector<Extension> {
for (int i = 0; i < extLen; i++) {
Array.setByte(value, i, extData[i]);
}
- Object[] passed = new Object[] { new Boolean(ext.isCritical()),
+ Object[] passed = new Object[] { Boolean.valueOf(ext.isCritical()),
value };
CertAttrSet crlExt = (CertAttrSet) cons.newInstance(passed);
map.put(crlExt.getName(), (Extension) crlExt);
diff --git a/base/util/src/netscape/security/x509/CertificateExtensions.java b/base/util/src/netscape/security/x509/CertificateExtensions.java
index a358a0f6a..a8ce5ebee 100644
--- a/base/util/src/netscape/security/x509/CertificateExtensions.java
+++ b/base/util/src/netscape/security/x509/CertificateExtensions.java
@@ -86,7 +86,7 @@ public class CertificateExtensions extends Vector<Extension>
for (int i = 0; i < extLen; i++) {
Array.setByte(value, i, extData[i]);
}
- Object[] passed = new Object[] { new Boolean(ext.isCritical()),
+ Object[] passed = new Object[] { Boolean.valueOf(ext.isCritical()),
value };
CertAttrSet certExt = cons.newInstance(passed);
if (certExt != null && certExt.getName() != null) {
diff --git a/base/util/src/netscape/security/x509/Extensions.java b/base/util/src/netscape/security/x509/Extensions.java
index e0a7e1f60..3feac9599 100644
--- a/base/util/src/netscape/security/x509/Extensions.java
+++ b/base/util/src/netscape/security/x509/Extensions.java
@@ -83,7 +83,7 @@ public class Extensions extends Vector<Extension>
for (int i = 0; i < extLen; i++) {
Array.setByte(value, i, extData[i]);
}
- Object[] passed = new Object[] { new Boolean(ext.isCritical()),
+ Object[] passed = new Object[] { Boolean.valueOf(ext.isCritical()),
value };
CertAttrSet certExt = cons.newInstance(passed);
map.put(certExt.getName(), (Extension) certExt);
diff --git a/base/util/src/netscape/security/x509/KeyUsageExtension.java b/base/util/src/netscape/security/x509/KeyUsageExtension.java
index d116c4def..15bf29b83 100644
--- a/base/util/src/netscape/security/x509/KeyUsageExtension.java
+++ b/base/util/src/netscape/security/x509/KeyUsageExtension.java
@@ -261,23 +261,23 @@ public class KeyUsageExtension extends Extension
*/
public Object get(String name) throws IOException {
if (name.equalsIgnoreCase(DIGITAL_SIGNATURE)) {
- return new Boolean(isSet(0));
+ return Boolean.valueOf(isSet(0));
} else if (name.equalsIgnoreCase(NON_REPUDIATION)) {
- return new Boolean(isSet(1));
+ return Boolean.valueOf(isSet(1));
} else if (name.equalsIgnoreCase(KEY_ENCIPHERMENT)) {
- return new Boolean(isSet(2));
+ return Boolean.valueOf(isSet(2));
} else if (name.equalsIgnoreCase(DATA_ENCIPHERMENT)) {
- return new Boolean(isSet(3));
+ return Boolean.valueOf(isSet(3));
} else if (name.equalsIgnoreCase(KEY_AGREEMENT)) {
- return new Boolean(isSet(4));
+ return Boolean.valueOf(isSet(4));
} else if (name.equalsIgnoreCase(KEY_CERTSIGN)) {
- return new Boolean(isSet(5));
+ return Boolean.valueOf(isSet(5));
} else if (name.equalsIgnoreCase(CRL_SIGN)) {
- return new Boolean(isSet(6));
+ return Boolean.valueOf(isSet(6));
} else if (name.equalsIgnoreCase(ENCIPHER_ONLY)) {
- return new Boolean(isSet(7));
+ return Boolean.valueOf(isSet(7));
} else if (name.equalsIgnoreCase(DECIPHER_ONLY)) {
- return new Boolean(isSet(8));
+ return Boolean.valueOf(isSet(8));
} else {
throw new IOException("Attribute name not recognized by"
+ " CertAttrSet:KeyUsage.");
diff --git a/base/util/src/netscape/security/x509/ReasonFlags.java b/base/util/src/netscape/security/x509/ReasonFlags.java
index b5153e108..f0eacb816 100755
--- a/base/util/src/netscape/security/x509/ReasonFlags.java
+++ b/base/util/src/netscape/security/x509/ReasonFlags.java
@@ -161,23 +161,23 @@ public class ReasonFlags {
*/
public Object get(String name) throws IOException {
if (name.equalsIgnoreCase(UNUSED)) {
- return new Boolean(isSet(0));
+ return Boolean.valueOf(isSet(0));
} else if (name.equalsIgnoreCase(KEY_COMPROMISE)) {
- return new Boolean(isSet(1));
+ return Boolean.valueOf(isSet(1));
} else if (name.equalsIgnoreCase(CA_COMPROMISE)) {
- return new Boolean(isSet(2));
+ return Boolean.valueOf(isSet(2));
} else if (name.equalsIgnoreCase(AFFLIATION_CHANGED)) {
- return new Boolean(isSet(3));
+ return Boolean.valueOf(isSet(3));
} else if (name.equalsIgnoreCase(SUPERSEDED)) {
- return new Boolean(isSet(4));
+ return Boolean.valueOf(isSet(4));
} else if (name.equalsIgnoreCase(CESSATION_OF_OPERATION)) {
- return new Boolean(isSet(5));
+ return Boolean.valueOf(isSet(5));
} else if (name.equalsIgnoreCase(CERTIFICATION_HOLD)) {
- return new Boolean(isSet(6));
+ return Boolean.valueOf(isSet(6));
} else if (name.equalsIgnoreCase(PRIVILEGE_WITHDRAWN)) {
- return new Boolean(isSet(7));
+ return Boolean.valueOf(isSet(7));
} else if (name.equalsIgnoreCase(AA_COMPROMISE)) {
- return new Boolean(isSet(8));
+ return Boolean.valueOf(isSet(8));
} else {
throw new IOException("Name not recognized by ReasonFlags");
}