/*-\r
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+ * ============LICENSE_START=======================================================\r
+ * VID\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
* See the License for the specific language governing permissions and\r
- * limitations under the License.
+ * limitations under the License.\r
* ============LICENSE_END=========================================================\r
*/\r
\r
\r
try {\r
while ((line = br.readLine()) != null) {\r
- final String[] entry = line.split(":");\r
- \r
- if (entry.length != 2) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (more than 1 colon found on a single line");\r
- if (!entry[1].startsWith(" ")) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (: not immediately followed by ' ')");\r
- \r
- metadata.put(entry[0], entry[1].substring(1));\r
+ if ( line.length() > 0 ) {\r
+ final String[] entry = line.split(":");\r
+ \r
+ if (entry.length != 2) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (more than 1 colon found on a single line");\r
+ if (!entry[1].startsWith(" ")) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (: not immediately followed by ' ')");\r
+ \r
+ metadata.put(entry[0], entry[1].substring(1));\r
+ }\r
}\r
} catch (IOException e) {\r
metadata.clear();\r