summaryrefslogtreecommitdiffstats
path: root/base/util/src/com
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-04-05 15:08:18 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-04-09 10:22:03 -0500
commit3f24e55923fc986af4c6a08b2b8d45704a905627 (patch)
tree716415853b5676b801f6707634305b59b9af8603 /base/util/src/com
parent7c7b9d023cd466c1771068badc020dab36beb553 (diff)
downloadpki-3f24e55923fc986af4c6a08b2b8d45704a905627.tar.gz
pki-3f24e55923fc986af4c6a08b2b8d45704a905627.tar.xz
pki-3f24e55923fc986af4c6a08b2b8d45704a905627.zip
Removed unnecessary type casts.
Unnecessary type casts have been removed using Eclipse Quick Fix. Ticket #134
Diffstat (limited to 'base/util/src/com')
-rw-r--r--base/util/src/com/netscape/cmsutil/http/HttpMessage.java2
-rw-r--r--base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java2
-rw-r--r--base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java2
-rw-r--r--base/util/src/com/netscape/cmsutil/radius/NASPacket.java2
-rw-r--r--base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java12
-rw-r--r--base/util/src/com/netscape/cmsutil/util/Utils.java4
-rw-r--r--base/util/src/com/netscape/cmsutil/xml/XMLObject.java4
7 files changed, 14 insertions, 14 deletions
diff --git a/base/util/src/com/netscape/cmsutil/http/HttpMessage.java b/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
index badec5930..398f38400 100644
--- a/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
+++ b/base/util/src/com/netscape/cmsutil/http/HttpMessage.java
@@ -56,7 +56,7 @@ public class HttpMessage {
* get a header
*/
public String getHeader(String name) {
- return (String) mHeaders.get(name.toLowerCase());
+ return mHeaders.get(name.toLowerCase());
}
/**
diff --git a/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java b/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
index eb43607f0..adad6ee37 100644
--- a/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
+++ b/base/util/src/com/netscape/cmsutil/password/PlainPasswordFile.java
@@ -44,7 +44,7 @@ public class PlainPasswordFile implements IPasswordStore {
}
public String getPassword(String tag) {
- return (String) mPwdStore.getProperty(tag);
+ return mPwdStore.getProperty(tag);
}
// return an array of String-based tag
diff --git a/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java b/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
index 68724a9f6..3a75097ec 100644
--- a/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
+++ b/base/util/src/com/netscape/cmsutil/password/PlainPasswordReader.java
@@ -43,7 +43,7 @@ public class PlainPasswordReader implements IPasswordReader {
}
public String getPassword(String tag) {
- return (String) mPwdStore.getProperty(tag);
+ return mPwdStore.getProperty(tag);
}
// return an array of String-based tag
diff --git a/base/util/src/com/netscape/cmsutil/radius/NASPacket.java b/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
index 70d143989..18c37af10 100644
--- a/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
+++ b/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
@@ -30,7 +30,7 @@ public abstract class NASPacket extends Packet {
ByteArrayOutputStream attrsOS = new ByteArrayOutputStream();
for (int i = 0; i < _attrs.size(); i++) {
- Attribute attr = (Attribute) getAttributeAt(i);
+ Attribute attr = getAttributeAt(i);
attrsOS.write(attr.getData());
}
diff --git a/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java b/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
index aef8de0b7..baf66e710 100644
--- a/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
+++ b/base/util/src/com/netscape/cmsutil/scep/CRSPKIMessage.java
@@ -712,7 +712,7 @@ public class CRSPKIMessage {
sd = (SignedData) sdt.decode(
new ByteArrayInputStream(
- ((ANY) crsci.getContent()).getEncoded()
+ crsci.getContent().getEncoded()
));
this.decodeSD();
}
@@ -736,19 +736,19 @@ public class CRSPKIMessage {
sdci = sd.getContentInfo();
// HACK to work with CRS
- ANY a = (ANY) sdci.getContent();
+ ANY a = sdci.getContent();
ByteArrayInputStream s = new ByteArrayInputStream(a.getEncoded());
OCTET_STRING os = (OCTET_STRING) (new OCTET_STRING.Template()).decode(s);
ByteArrayInputStream s2 = new ByteArrayInputStream(os.toByteArray());
ContentInfo ci = (ContentInfo) (new ContentInfo.Template()).decode(s2);
- ByteArrayInputStream s3 = new ByteArrayInputStream(((ANY) ci.getContent()).getEncoded());
+ ByteArrayInputStream s3 = new ByteArrayInputStream(ci.getContent().getEncoded());
EnvelopedData.Template edt = new EnvelopedData.Template();
sded = (EnvelopedData) edt.decode(s3);
- SET signerCerts = (SET) sd.getCertificates();
+ SET signerCerts = sd.getCertificates();
Certificate firstCert = (Certificate) signerCerts.elementAt(0);
signerCertBytes = ASN1Util.encode(firstCert);
@@ -777,7 +777,7 @@ public class CRSPKIMessage {
private void decodeED() throws Exception {
SET ris;
- ris = (SET) sded.getRecipientInfos();
+ ris = sded.getRecipientInfos();
if (ris.size() == 0) {
throw new Exception("RecipientInfos is empty");
@@ -842,7 +842,7 @@ public class CRSPKIMessage {
for (count = 0; count < aa.size(); count++) {
Attribute a = (Attribute) aa.elementAt(count);
- SET s = (SET) a.getValues();
+ SET s = a.getValues();
ANY f = (ANY) s.elementAt(0);
PrintableString ps;
PrintableString.Template pst = new PrintableString.Template();
diff --git a/base/util/src/com/netscape/cmsutil/util/Utils.java b/base/util/src/com/netscape/cmsutil/util/Utils.java
index bfd1e5297..75e63f2b0 100644
--- a/base/util/src/com/netscape/cmsutil/util/Utils.java
+++ b/base/util/src/com/netscape/cmsutil/util/Utils.java
@@ -98,7 +98,7 @@ public class Utils {
ByteArrayOutputStream out = new ByteArrayOutputStream(s.length());
for (int i = 0; i < s.length(); i++) {
- int c = (int) s.charAt(i);
+ int c = s.charAt(i);
if (c == '+') {
out.write(' ');
@@ -120,7 +120,7 @@ public class Utils {
ByteArrayOutputStream out = new ByteArrayOutputStream(s.length());
for (int i = 0; i < s.length(); i++) {
- int c = (int) s.charAt(i);
+ int c = s.charAt(i);
if (c == '+') {
out.write(' ');
diff --git a/base/util/src/com/netscape/cmsutil/xml/XMLObject.java b/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
index ed2fb67ee..a7715ec99 100644
--- a/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
+++ b/base/util/src/com/netscape/cmsutil/xml/XMLObject.java
@@ -77,7 +77,7 @@ public class XMLObject {
public Node createRoot(String name) {
Element root = mDoc.createElement(name);
mDoc.appendChild(root);
- return (Node) root;
+ return root;
}
public Node getRoot() {
@@ -98,7 +98,7 @@ public class XMLObject {
public Node createContainer(Node containerParent, String containerName) {
Element node = mDoc.createElement(containerName);
containerParent.appendChild(node);
- return (Node) node;
+ return node;
}
public void addItemToContainer(Node container, String tagname, String value) {