From f5cd1fa79a74f2e2cbb9825257f0535af303da80 Mon Sep 17 00:00:00 2001 From: AvinashS Date: Fri, 15 Sep 2017 06:40:51 +0000 Subject: Fix Tosca meta validation Fixed failure due to empty chars in the TOSCA-Meta string. IssueId: VNFSDK-86 Change-Id: Ic5301cb3763cabdbb3cfd49e32f0b592acc911d9 Signed-off-by: AvinashS --- .../src/main/java/org/onap/validation/csar/CsarParser.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/csarvalidation/src/main/java/org/onap/validation/csar/CsarParser.java b/csarvalidation/src/main/java/org/onap/validation/csar/CsarParser.java index 62e8492..410562c 100644 --- a/csarvalidation/src/main/java/org/onap/validation/csar/CsarParser.java +++ b/csarvalidation/src/main/java/org/onap/validation/csar/CsarParser.java @@ -48,7 +48,9 @@ public class CsarParser { * * validateCsarMeta(); * - * + * validateToscaMeta(); + * + * validateManifest(); * } */ @@ -167,7 +169,7 @@ public class CsarParser { for(String strLine : lines) { if (!attribute.isEmpty() && strLine.contains(attribute)) { - return strLine.substring(attribute.length(), strLine.length()); + return strLine.substring(attribute.length(), strLine.length()).trim(); } } return null; -- cgit 1.2.3-korg