aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/policy/policy-apex-pdp
diff options
context:
space:
mode:
authorzhaoliping123 <zhaoliping@chinamobile.com>2019-10-25 11:22:39 +0800
committerzhaoliping123 <zhaoliping@chinamobile.com>2019-10-25 14:40:41 +0800
commit39b397e2ed0c1e38ac88cbbdab29f085f6cacf2e (patch)
tree06f5fc93ded0460551a0a112cfc5384c2def0ac3 /scripts/policy/policy-apex-pdp
parentdc56b9e2843722d7aa6eab649e26e5372e592c80 (diff)
Add some test cases for VF-C catalog to CSIT
Issue-ID: VFC-1534 Change-Id: I19fc6a441e50c60bdc8d2af51640ff72ebc058c6 Signed-off-by: zhaoliping123 <zhaoliping@chinamobile.com>
Diffstat (limited to 'scripts/policy/policy-apex-pdp')
0 files changed, 0 insertions, 0 deletions
c-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/SshJcraftWrapper.java
+++ b/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/SshJcraftWrapper.java
@@ -54,6 +54,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.StringTokenizer;
+import org.apache.commons.lang.StringUtils;
public class SshJcraftWrapper {
@@ -375,7 +376,7 @@ public class SshJcraftWrapper {
String fnName = "SshJcraftWrapper.checkIfReceivedStringMatchesDelimeter:::";
int x;
int c;
- String str = null;
+ String str = StringUtils.EMPTY;
if (jcraftReadSwConfigFileFromDisk()) {
DebugLog.printAriDebug(fnName, "jcraftReadSwConfigFileFromDisk block");
@@ -1065,14 +1066,13 @@ public class SshJcraftWrapper {
}
sftp.put(is, fullPathDest, ChannelSftp.OVERWRITE);
debugLog.printRTAriDebug(fn, "Sent successfully");
- sftpSession.disconnect();
- sftpSession = null;
} catch (Exception e) {
debugLog.printRTAriDebug(fn, "Caught an Exception, e=" + e);
- sftpSession.disconnect();
- sftpSession = null;
- // dbLog.storeData("ErrorMsg= sftp threw an Exception. error is:"+e);
throw new IOException(e.toString());
+ } finally {
+ if(sftpSession != null) {
+ sftpSession.disconnect();
+ }
}
}