BUG-3438 Prevent null pointer for keepalives(netconf-connector) 35/21535/3
authorMaros Marsalek <mmarsale@cisco.com>
Mon, 1 Jun 2015 08:47:41 +0000 (10:47 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 4 Jun 2015 10:39:06 +0000 (10:39 +0000)
Change-Id: If480ddb8c6a494eca5affc9d93db6f1fd11e5972
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/KeepaliveSalFacade.java

index d302cacf7732ea5bd8d0ce5e2765908f6fea22ff..3537cd92b0bd6d2cdf73e7e22f1379336406eb37 100644 (file)
@@ -100,7 +100,9 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
      * Cancel current keepalive and also reset current deviceRpc
      */
     private void stopKeepalives() {
-        currentKeepalive.cancel(false);
+        if(currentKeepalive != null) {
+            currentKeepalive.cancel(false);
+        }
         currentDeviceRpc = null;
     }