diff options
author | Murali <murali.p@huawei.com> | 2017-09-04 05:51:44 +0000 |
---|---|---|
committer | Murali <murali.p@huawei.com> | 2017-09-04 05:51:44 +0000 |
commit | 56054e27dbb0464adf101aac0597ec3906a315ce (patch) | |
tree | 2e17030a20d8ddc8b1d2d8addd7a9a19bee39b08 | |
parent | d2e09ecf54829f134219c921a170406223d8dece (diff) |
Fix the null pointer exception
Change-Id: I1ebc769db84dfe9fe53f4cc60576bb7f855b9d92
Jira:VNFSDK-34
Signed-off-by: Murali <murali.p@huawei.com>
-rw-r--r-- | vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java index b6fba66e..3bb383fd 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java @@ -201,9 +201,14 @@ public class PackageWrapper { return Response.status(Status.EXPECTATION_FAILED).build(); } - LOG.info("the fileDetail = " + ToolUtil.objectToString(fileDetail)); + String fileName = "temp_"+ packageId + ".csar"; + if (null != fileDetail) + { + LOG.info("the fileDetail = " + ToolUtil.objectToString(fileDetail)); - String fileName = ToolUtil.processFileName(fileDetail.getFileName()); + fileName = ToolUtil.processFileName(fileDetail.getFileName()); + } + String localDirName = ToolUtil.getTempDir(CommonConstant.CATALOG_CSAR_DIR_NAME, fileName); String contentRange = null; |