Otherwise it raises NullPointerException later in the process.
Change-Id: Icc662493b3239cecf790400f25b5970a570e9f8b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
if (circuitPackObject.isPresent()) {
CircuitPacks cp = circuitPackObject.get();
- if (!cp.getPorts().isEmpty()) {
+ if (cp.getPorts() == null) {
+ LOG.warn("No port found for {} {}: {}", deviceInfo.getNodeId(), circuitPackName, cp);
+ } else if (!cp.getPorts().isEmpty()) {
for (Ports port : cp.getPorts()) {
if (port.getLogicalConnectionPoint() != null && port.getPortQual().getIntValue() == 2) {