commit | 9100624d481e3a29fa78a12039803f224d328741 | [log] [tgz] |
---|---|---|
author | Ayaka Koshibe <ayaka@onlab.us> | Wed Jun 03 12:09:16 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Wed Jun 03 20:07:17 2015 +0000 |
tree | fa36ee39aed8315597c1f07d9c38b7ccd2fde9fa | |
parent | d0d5854e829054de8815776f05a0f26b69aefb34 [diff] |
ConfigProvider: Protect against potential NPE when reading files Change-Id: Id9174ddf16fb02a19b987eb428bc68ee43139165
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/ConfigProvider.java b/web/api/src/main/java/org/onosproject/rest/resources/ConfigProvider.java index d0ae044..da76b86 100644 --- a/web/api/src/main/java/org/onosproject/rest/resources/ConfigProvider.java +++ b/web/api/src/main/java/org/onosproject/rest/resources/ConfigProvider.java
@@ -278,6 +278,9 @@ } private void updatePorts(ConnectPoint src, ConnectPoint dst, SparseAnnotations annotations) { + if (annotations == null) { + return; + } final String linkType = annotations.value("optical.type"); if ("cross-connect".equals(linkType)) { String value = annotations.value("bandwidth").trim();