Ayaka Koshibe
Committed by Gerrit Code Review

ConfigProvider: Protect against potential NPE when reading files

Change-Id: Id9174ddf16fb02a19b987eb428bc68ee43139165
......@@ -278,6 +278,9 @@ class ConfigProvider implements DeviceProvider, LinkProvider, HostProvider {
}
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();
......