summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/logging
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/cms/logging
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/cms/logging')
-rw-r--r--base/common/src/com/netscape/cms/logging/LogFile.java10
-rw-r--r--base/common/src/com/netscape/cms/logging/RollingLogFile.java2
2 files changed, 6 insertions, 6 deletions
diff --git a/base/common/src/com/netscape/cms/logging/LogFile.java b/base/common/src/com/netscape/cms/logging/LogFile.java
index fa5531a8e..95d4b34bf 100644
--- a/base/common/src/com/netscape/cms/logging/LogFile.java
+++ b/base/common/src/com/netscape/cms/logging/LogFile.java
@@ -1321,16 +1321,16 @@ public class LogFile implements ILogEventListener, IExtendedPluginInfo {
int maxLine = -1, level = -1, source = -1;
Vector<LogEntry> entries = null;
- if ((tmp = (String) req.get(Constants.PR_LOG_ENTRY)) != null) {
+ if ((tmp = req.get(Constants.PR_LOG_ENTRY)) != null) {
maxLine = Integer.parseInt(tmp);
}
- if ((tmp = (String) req.get(Constants.PR_LOG_LEVEL)) != null) {
+ if ((tmp = req.get(Constants.PR_LOG_LEVEL)) != null) {
level = Integer.parseInt(tmp);
}
- if ((tmp = (String) req.get(Constants.PR_LOG_SOURCE)) != null) {
+ if ((tmp = req.get(Constants.PR_LOG_SOURCE)) != null) {
source = Integer.parseInt(tmp);
}
- tmp = (String) req.get(Constants.PR_LOG_NAME);
+ tmp = req.get(Constants.PR_LOG_NAME);
if (!(tmp.equals(Constants.PR_CURRENT_LOG))) {
fName = tmp;
} else {
@@ -1341,7 +1341,7 @@ public class LogFile implements ILogEventListener, IExtendedPluginInfo {
entries = readEntry(maxLine, level, source, fName);
for (int i = 0; i < entries.size(); i++) {
params.put(Integer.toString(i) +
- ((LogEntry) entries.elementAt(i)).getEntry(), "");
+ entries.elementAt(i).getEntry(), "");
}
} catch (Exception e) {
CMS.getLogger().log(ILogger.EV_SYSTEM, ILogger.S_OTHER,
diff --git a/base/common/src/com/netscape/cms/logging/RollingLogFile.java b/base/common/src/com/netscape/cms/logging/RollingLogFile.java
index 312978fae..d420f547d 100644
--- a/base/common/src/com/netscape/cms/logging/RollingLogFile.java
+++ b/base/common/src/com/netscape/cms/logging/RollingLogFile.java
@@ -461,7 +461,7 @@ public class RollingLogFile extends LogFile {
// First, remove any old log files and figure out when the
// next one expires
try {
- wakeupTime = expire((long) (mExpirationTime / 1000));
+ wakeupTime = expire(mExpirationTime / 1000);
} catch (SecurityException e) {
ConsoleError.send(new
SystemEvent(CMS.getUserMessage("CMS_LOG_EXPIRE_LOG_FAILED", e.toString())));