Fixed NPE and updated logging. 10/5410/1
authorDana Kutenicsova <dkutenic@cisco.com>
Wed, 19 Feb 2014 09:24:43 +0000 (10:24 +0100)
committerDana Kutenicsova <dkutenic@cisco.com>
Wed, 19 Feb 2014 09:24:43 +0000 (10:24 +0100)
Change-Id: I9c2aaa2e35dad85ceccdeeb0a2fec704538ab43c
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListener.java

index 74a4ec72083147f2cd90182ec66e41c8fe1a2640..75df73e242438efdc088593c1a671e84293d2422 100644 (file)
@@ -207,7 +207,7 @@ public class Stateful02TopologySessionListener extends AbstractTopologySessionLi
                final InstanceIdentifier<ReportedLsp> lsp = lspIdentifier(input.getName()).build();
                final ReportedLsp rep = this.serverSessionManager.readOperationalData(lsp);
                if (rep == null) {
-                       LOG.debug("Node {} does not contain LSP {}", input.getNode(), input.getName());
+                       LOG.warn("Node {} does not contain LSP {}", input.getNode(), input.getName());
                        return OperationResults.UNSENT.future();
                }
 
@@ -229,7 +229,9 @@ public class Stateful02TopologySessionListener extends AbstractTopologySessionLi
        public synchronized ListenableFuture<OperationResult> ensureLspOperational(final EnsureLspOperationalInput input) {
                Boolean op = null;
                final Arguments1 aa = input.getArguments().getAugmentation(Arguments1.class);
-               if (aa != null) {
+               if (aa == null) {
+                       LOG.warn("Operational status not present in MD-SAL.");
+               } else {
                        op = aa.isOperational();
                }