summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYan Yang <yangyanyj@chinamobile.com>2018-09-03 04:26:47 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-03 04:26:47 +0000
commit1eede27fbe0784fd3a190e34ae5d5dfc7ae41242 (patch)
tree7eee0b63a898779a8ea8fafb97307b2401a899e1
parent5af95dd92babcffc0a364f1591030fe0ce43ff08 (diff)
parent33c2762822f77bf5f08a33248f96571cc5cff6de (diff)
Merge "Adding a constant to remove duplicate string"
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java7
1 files 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;