From 3f24e55923fc986af4c6a08b2b8d45704a905627 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Thu, 5 Apr 2012 15:08:18 -0500 Subject: Removed unnecessary type casts. Unnecessary type casts have been removed using Eclipse Quick Fix. Ticket #134 --- .../com/netscape/certsrv/request/ARequestNotifier.java | 16 ++++++++-------- .../src/com/netscape/certsrv/request/AgentApprovals.java | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'base/common/src/com/netscape/certsrv/request') 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 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 toStringVector() { Vector retval = new Vector(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()); } -- cgit