summaryrefslogtreecommitdiffstats
path: root/vnfmarket-be
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket-be')
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java43
1 files changed, 21 insertions, 22 deletions
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 cddb4c4e..1777c1ec 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
@@ -308,28 +308,27 @@ public class PackageWrapperUtil {
File file = new File(unzipFile);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
- String tempString = null;
- while ((tempString = reader.readLine()) != null) {
-
- // If line is empty, ignore
- if ("".equals(tempString)) {
- continue;
- }
-
- int count1 = tempString.indexOf(":");
- String meta = tempString.substring(0, count1).trim();
-
- // Check for the package provider name
- if (meta.equalsIgnoreCase(CommonConstant.MF_PROVIDER_META)) {
- int count = tempString.indexOf(":") + 1;
- basicInfo.setProvider(tempString.substring(count).trim());
- }
-
- // Check for package version
- if (meta.equalsIgnoreCase(CommonConstant.MF_VERSION_META)) {
- int count = tempString.indexOf(":") + 1;
- basicInfo.setVersion(tempString.substring(count).trim());
- }
+ for(String tempString = null; (tempString = reader.readLine()) != null;)
+ {
+ // If line is empty, ignore
+ if ("".equals(tempString)) {
+ continue;
+ }
+
+ int count1 = tempString.indexOf(":");
+ String meta = tempString.substring(0, count1).trim();
+
+ // Check for the package provider name
+ if (meta.equalsIgnoreCase(CommonConstant.MF_PROVIDER_META)) {
+ int count = tempString.indexOf(":") + 1;
+ basicInfo.setProvider(tempString.substring(count).trim());
+ }
+
+ // Check for package version
+ if (meta.equalsIgnoreCase(CommonConstant.MF_VERSION_META)) {
+ int count = tempString.indexOf(":") + 1;
+ basicInfo.setVersion(tempString.substring(count).trim());
+ }
}
reader.close();