aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans
diff options
context:
space:
mode:
authorjimmydot <jf2512@att.com>2017-05-30 16:06:51 -0400
committerjimmydot <jf2512@att.com>2017-05-30 16:06:51 -0400
commit6c7dcba5be04a502a2d5de7e7c5f14eedf9eaa2a (patch)
tree85f583353ede474b859e46707f15cb4326ea863a /vid-app-common/src/main/java/org/openecomp/vid/asdc/beans
parentef3524df38879e4f070a018beb3de494cf276fee (diff)
[VID-12] Delivery of remaining features for v1.1
Change-Id: I50305ba25aaa34ee1ca7640237f31ab824655a34 Signed-off-by: jimmydot <jf2512@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp/vid/asdc/beans')
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java
index 66938372..a5295c47 100755
--- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java
@@ -1,9 +1,9 @@
/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -14,7 +14,7 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
* ============LICENSE_END=========================================================
*/
@@ -104,12 +104,14 @@ public class ToscaMeta {
try {
while ((line = br.readLine()) != null) {
- final String[] entry = line.split(":");
-
- if (entry.length != 2) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (more than 1 colon found on a single line");
- if (!entry[1].startsWith(" ")) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (: not immediately followed by ' ')");
-
- metadata.put(entry[0], entry[1].substring(1));
+ if ( line.length() > 0 ) {
+ final String[] entry = line.split(":");
+
+ if (entry.length != 2) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (more than 1 colon found on a single line");
+ if (!entry[1].startsWith(" ")) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (: not immediately followed by ' ')");
+
+ metadata.put(entry[0], entry[1].substring(1));
+ }
}
} catch (IOException e) {
metadata.clear();