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 --- base/common/src/com/netscape/cms/logging/LogFile.java | 10 +++++----- base/common/src/com/netscape/cms/logging/RollingLogFile.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'base/common/src/com/netscape/cms/logging') 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 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()))); -- cgit