>From 01b510f51992e04ffc84aefdd2d3e1f09b09b480 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Thu, 30 Mar 2017 22:57:19 +0200
Subject: [PATCH] Removed duplicate PROP_EXPIRATION_TIME constant.

Change-Id: Ife9108019994b385fc452da0f29dee64d0ccc5d3
---
 base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java   | 7 +++----
 .../cms/src/com/netscape/cms/servlet/admin/LogAdminServlet.java    | 6 +++---
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java b/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java
index 4d2971502a59c40eae7aaf50cc25b6321ca0396e..fb70f46c1b337187c70715017cb9aa9fb94ec63f 100644
--- a/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java
+++ b/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java
@@ -49,7 +49,6 @@ import com.netscape.cmsutil.util.Utils;
  * @version $Revision$, $Date$
  */
 public class RollingLogFile extends LogFile {
-    public static final String PROP_EXPIRATION_TIME = "expirationTime";
 
     /**
      * The default max file size in bytes
@@ -116,7 +115,7 @@ public class RollingLogFile extends LogFile {
 
         rl_init(config.getInteger(Constants.PR_LOG_MAXFILESIZE, MAX_FILE_SIZE),
                 config.getString(Constants.PR_LOG_ROLLEROVER_INTERVAL, ROLLOVER_INTERVAL),
-                config.getString(PROP_EXPIRATION_TIME, EXPIRATION_TIME));
+                config.getString(Constants.PR_LOG_EXPIRED_TIME, EXPIRATION_TIME));
     }
 
     /**
@@ -585,7 +584,7 @@ public class RollingLogFile extends LogFile {
 
         v.addElement(Constants.PR_LOG_MAXFILESIZE + "=");
         v.addElement(Constants.PR_LOG_ROLLEROVER_INTERVAL + "=");
-        //v.addElement(PROP_EXPIRATION_TIME + "=");
+        //v.addElement(Constants.PR_LOG_EXPIRED_TIME + "=");
         return v;
     }
 
@@ -623,7 +622,7 @@ public class RollingLogFile extends LogFile {
                 + ";integer;If the current log file size if bigger than this parameter in kilobytes(KB), the file will be rotated.");
         info.addElement(Constants.PR_LOG_ROLLEROVER_INTERVAL
                 + ";choice(Hourly,Daily,Weekly,Monthly,Yearly);The frequency of the log being rotated.");
-        info.addElement(PROP_EXPIRATION_TIME
+        info.addElement(Constants.PR_LOG_EXPIRED_TIME
                 + ";integer;The amount of time before a backed up log is removed in seconds");
         info.addElement(IExtendedPluginInfo.HELP_TOKEN +
                 //";configuration-logrules-rollinglogfile");
diff --git a/base/server/cms/src/com/netscape/cms/servlet/admin/LogAdminServlet.java b/base/server/cms/src/com/netscape/cms/servlet/admin/LogAdminServlet.java
index 08c329356b4e2a5b740c41ec29d98c7fb05535e1..13ba52c15ecf4ece453eec6f029e35125f640875 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/admin/LogAdminServlet.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/admin/LogAdminServlet.java
@@ -834,7 +834,7 @@ public class LogAdminServlet extends AdminServlet {
             // files is no longer supported, it is still a required parameter
             // that must be present during the creation and modification of
             // custom log plugins.
-            substore.put("expirationTime", "0");
+            substore.put(Constants.PR_LOG_EXPIRED_TIME, "0");
 
             // Instantiate an object for this implementation
             String className = plugin.getClassPath();
@@ -1591,7 +1591,7 @@ public class LogAdminServlet extends AdminServlet {
             // files is no longer supported, it is still a required parameter
             // that must be present during the creation and modification of
             // custom log plugins.
-            substore.put("expirationTime", "0");
+            substore.put(Constants.PR_LOG_EXPIRED_TIME, "0");
 
             // IMPORTANT:  save a copy of the original log file path
             origLogPath = substore.getString(Constants.PR_LOG_FILENAME);
@@ -1702,7 +1702,7 @@ public class LogAdminServlet extends AdminServlet {
                             }
                         }
                         /*
-                                                if (key.equals("expirationTime")) {
+                                                if (key.equals(Constants.PR_LOG_EXPIRED_TIME)) {
                                                     String origVal = substore.getString(key);
 
                                                     val = val.trim();
-- 
2.9.3

