summaryrefslogtreecommitdiffstats
path: root/base/util
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 /base/util
parenta6fca9587905f455c4b0306b02d77334a295305e (diff)
downloadpki-307199314968b85059de62fbb694bd62b2502f46.tar.gz
pki-307199314968b85059de62fbb694bd62b2502f46.tar.xz
pki-307199314968b85059de62fbb694bd62b2502f46.zip
Fixes for Coverity Defects of Category : FB.DM_BOOLEAN_CTOR
Diffstat (limited to 'base/util')
-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
8 files changed, 24 insertions, 24 deletions
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");
}