From 9d43ccde37e50209870c80c62d447868b7460ef8 Mon Sep 17 00:00:00 2001 From: Murali Date: Wed, 27 Sep 2017 12:15:16 +0000 Subject: Fix the constructor issue Change-Id: If71d8534a37416ddc2453d8b67be9a513ed0287a Jira:VNFSDK-85 Signed-off-by: Murali --- .../onap/vnfsdk/marketplace/common/CommonErrorResponse.java | 11 +++++------ .../onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'vnfmarket-be/vnf-sdk-marketplace') diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java index 2c22bdca..967d0039 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java @@ -19,6 +19,11 @@ package org.onap.vnfsdk.marketplace.common; public class CommonErrorResponse { private String message; + + public CommonErrorResponse(String message) { + super(); + this.message = message; + } public String getMessage() { return message; @@ -27,11 +32,5 @@ public class CommonErrorResponse { public static Object failure(String message) { return message; } - - public CommonErrorResponse(String message) { - super(); - this.message = message; - } - } diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java index 1777c1ec..8eb68eb2 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java @@ -184,8 +184,8 @@ public class PackageWrapperUtil { */ public static String getPackageName(String ftpUrl) { int index = ftpUrl.lastIndexOf("/"); - String packageName = ftpUrl.substring(index); - return packageName; + + return ftpUrl.substring(index); } /** @@ -308,7 +308,7 @@ public class PackageWrapperUtil { File file = new File(unzipFile); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { - for(String tempString = null; (tempString = reader.readLine()) != null;) + for(String tempString; (tempString = reader.readLine()) != null;) { // If line is empty, ignore if ("".equals(tempString)) { -- cgit 1.2.3-korg