From 33c2762822f77bf5f08a33248f96571cc5cff6de Mon Sep 17 00:00:00 2001 From: Sooriyaa Date: Fri, 24 Aug 2018 14:29:31 +0530 Subject: Adding a constant to remove duplicate string Adding a constant to remove duplicate string Issue-ID: VFC-1074 Change-Id: Ibf6b61dc5ef8b547277861aad6ffe5d5bb8a479c Signed-off-by: Sooriyaa --- .../java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java index 2e8656d..3b20f2c 100644 --- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java +++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java @@ -51,6 +51,7 @@ public class TaskThread implements Runnable { private String resultPath = Constant.SYS_DATA_RESULT; private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); private SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + public static final String PORT_STRING = "] port=["; public TaskThread(CollectMsg data) { this.data = data; @@ -567,7 +568,7 @@ public class TaskThread implements Runnable { ftpClient.login(ip, Integer.parseInt(port), ftpUser, ftpPassword, "GBK", Boolean.parseBoolean(ftpPassive), 5 * 60 * 1000); } catch (Exception e) { - log.error("login fail,ip=[" + ip + "] port=[" + port + "] user=[" + log.error("login fail,ip=[" + ip + PORT_STRING + port + "] user=[" + ftpUser + "]pwd=[" + ftpPassword + "]" + StringUtil.getStackTrace(e)); return; @@ -740,12 +741,12 @@ public class TaskThread implements Runnable { // login try { - log.info("ftp login ,ip=[" + ip + "] port=[" + port + "] user=[" + log.info("ftp login ,ip=[" + ip + PORT_STRING + port + "] user=[" + user + /* "]password=[" + password + */"]"); ftpClient.login(ip, Integer.parseInt(port), user, password, "GBK", Boolean.parseBoolean(passivemode), 5 * 60 * 1000); } catch (Exception e) { - log.error("login fail,ip=[" + ip + "] port=[" + port + "] user=[" + log.error("login fail,ip=[" + ip + PORT_STRING + port + "] user=[" + user + /* "]password=[" + password + */"]" + StringUtil.getStackTrace(e)); return fileList; -- cgit 1.2.3-korg