Bulk-add copyright headers to .xtend files
[controller.git] / opendaylight / md-sal / compatibility / sal-compatibility / src / main / java / org / opendaylight / controller / sal / compatibility / FlowProgrammerAdapter.xtend
index 35c641c45aae4e3d0b9f18233abd96228e8ca8fd..fac12ee10d642f3acb0cad9057c699e10d9446fd 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.sal.compatibility
 
 import java.util.Map
@@ -141,7 +148,12 @@ class FlowProgrammerAdapter implements IPluginInFlowProgrammerService, SalFlowLi
     }
     
     override onFlowRemoved(FlowRemoved notification) {
-        flowProgrammerPublisher.flowRemoved(notification.node.toADNode,notification.toFlow());
+        if(notification != null && notification.node != null) {
+            val adNode = notification.node.toADNode
+            if(adNode != null) {
+                flowProgrammerPublisher.flowRemoved(adNode,notification.toFlow(adNode));
+            }
+        } 
     }
     
     override onFlowUpdated(FlowUpdated notification) {