summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/request
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/common/src/com/netscape/certsrv/request
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/common/src/com/netscape/certsrv/request')
-rw-r--r--base/common/src/com/netscape/certsrv/request/ARequestNotifier.java16
-rw-r--r--base/common/src/com/netscape/certsrv/request/AgentApprovals.java2
2 files changed, 9 insertions, 9 deletions
diff --git a/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java b/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
index 98338601a..ac57c1313 100644
--- a/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
+++ b/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
@@ -161,7 +161,7 @@ public class ARequestNotifier implements IRequestNotifier {
* @return listener
*/
public IRequestListener getListener(String name) {
- return (IRequestListener) mListeners.get(name);
+ return mListeners.get(name);
}
/**
@@ -205,7 +205,7 @@ public class ARequestNotifier implements IRequestNotifier {
CMS.debug("getRequest mRequests=" + mRequests.size() + " mSearchForRequests=" + mSearchForRequests);
if (mSearchForRequests && mRequests.size() == 1) {
- id = (String) mRequests.elementAt(0);
+ id = mRequests.elementAt(0);
if (mCA != null && mRequestQueue == null)
mRequestQueue = mCA.getRequestQueue();
if (id != null && mRequestQueue != null) {
@@ -258,7 +258,7 @@ public class ARequestNotifier implements IRequestNotifier {
}
}
if (mRequests.size() > 0) {
- id = (String) mRequests.elementAt(0);
+ id = mRequests.elementAt(0);
if (id != null) {
CMS.debug("getRequest getting request: " + id);
if (mCA != null && mRequestQueue == null)
@@ -332,7 +332,7 @@ public class ARequestNotifier implements IRequestNotifier {
Enumeration<IRequestListener> listeners = mListeners.elements();
if (listeners != null && r != null) {
while (listeners.hasMoreElements()) {
- IRequestListener l = (IRequestListener) listeners.nextElement();
+ IRequestListener l = listeners.nextElement();
CMS.debug("RunListeners: IRequestListener = " + l.getClass().getName());
l.accept(r);
}
@@ -428,7 +428,7 @@ public class ARequestNotifier implements IRequestNotifier {
" requests by adding request " + r.getRequestId().toString());
if (morePublishingThreads()) {
try {
- Thread notifierThread = new Thread(new RunListeners((IRequestNotifier) this));
+ Thread notifierThread = new Thread(new RunListeners(this));
if (notifierThread != null) {
mNotifierThreads.addElement(notifierThread);
CMS.debug("Number of publishing threads: " + mNotifierThreads.size());
@@ -462,7 +462,7 @@ public class ARequestNotifier implements IRequestNotifier {
if (morePublishingThreads()) {
mSearchForRequests = true;
try {
- Thread notifierThread = new Thread(new RunListeners((IRequestNotifier) this));
+ Thread notifierThread = new Thread(new RunListeners(this));
if (notifierThread != null) {
mNotifierThreads.addElement(notifierThread);
CMS.debug("Number of publishing threads: " + mNotifierThreads.size());
@@ -520,10 +520,10 @@ class RunListeners implements Runnable {
" " + ((mRequest != null) ? " SingleRequest" : " noSingleRequest"));
do {
if (mRequestNotifier != null)
- mRequest = (IRequest) mRequestNotifier.getRequest();
+ mRequest = mRequestNotifier.getRequest();
if (mListeners != null && mRequest != null) {
while (mListeners.hasMoreElements()) {
- IRequestListener l = (IRequestListener) mListeners.nextElement();
+ IRequestListener l = mListeners.nextElement();
CMS.debug("RunListeners: IRequestListener = " + l.getClass().getName());
l.accept(mRequest);
}
diff --git a/base/common/src/com/netscape/certsrv/request/AgentApprovals.java b/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
index 2c957b6ee..cb3dd2ceb 100644
--- a/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
+++ b/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
@@ -113,7 +113,7 @@ public class AgentApprovals
public Vector<String> toStringVector() {
Vector<String> retval = new Vector<String>(mVector.size());
for (int i = 0; i < mVector.size(); i++) {
- AgentApproval a = (AgentApproval) mVector.elementAt(i);
+ AgentApproval a = mVector.elementAt(i);
retval.add(a.getDate().getTime() + ";" + a.getUserName());
}