summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajay priyadarshi <ajay.priyadarshi@ril.com>2018-03-20 12:13:32 +0530
committerajay priyadarshi <ajay.priyadarshi@ril.com>2018-03-20 12:13:32 +0530
commit16e2df531e52ce4c28eba074c7001dfe6d486b08 (patch)
tree4546d8312aaf5cbd7bf99d2c16231e5b47bb5287
parentd13f299a09277aa735d3cb97b339a83fcd5715f6 (diff)
sonar fix:Code smells in emsdriver ftp
commons/ftp/FTPSrv.java file name: FTPSrv.java Change-Id: Ie1fdcaa994aead1e0cfcd1945f9ce54599da5315 Issue-ID: VFC-832 Signed-off-by: ajay priyadarshi <ajay.priyadarshi@ril.com>
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java
index 3d470b5..34baa30 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java
@@ -49,7 +49,6 @@ public class FTPSrv implements FTPInterface {
ftpClientConfig.setServerTimeZoneId(TimeZone.getDefault().getID());
this.ftpClient.setControlEncoding("GBK");
this.ftpClient.configure(ftpClientConfig);
-// ftpClient.setParserFactory(new ExtendsDefaultFTPFileEntryParserFactory());
if (encode != null && encode.length() > 0) {
ftpClient.setControlEncoding(encode);
@@ -138,7 +137,7 @@ public class FTPSrv implements FTPInterface {
String currdir = null;
try {
currdir = ftpClient.printWorkingDirectory();
- if (currdir.endsWith("/") == false) {
+ if (!currdir.endsWith("/")) {
currdir = currdir + "/";
}
FTPFile[] rfileList = null;
@@ -156,8 +155,7 @@ public class FTPSrv implements FTPInterface {
@Override
public String pwd() throws IOException {
- String returnValue = ftpClient.printWorkingDirectory();
- return returnValue;
+ return ftpClient.printWorkingDirectory();
}
}