X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2FNetconfDeviceListener.java;h=69fe4aa1904e57ac83512400eaf6a3688a8da3ea;hb=c61d22e4dc73fdaba09aa8c0b189ea7459679e03;hp=8623d90fe5465600fff4cf31253a52b4da57a5dc;hpb=91d7c1ee52322acad08e9f81228ac36b3aa684f5;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDeviceListener.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDeviceListener.java index 8623d90fe5..69fe4aa190 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDeviceListener.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDeviceListener.java @@ -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.connect.netconf; import com.google.common.base.Objects; @@ -71,17 +78,11 @@ class NetconfDeviceListener extends NetconfClientSessionListener { */ public void onNotification(final NetconfClientSession session, final NetconfMessage message) { this.device.logger.debug("Received NETCONF notification.", message); - CompositeNode _notificationBody = null; - CompositeNode _compositeNode = null; + CompositeNode domNotification = null; if (message != null) { - _compositeNode = NetconfMapping.toCompositeNode(message,device.getSchemaContext()); + domNotification = NetconfMapping.toNotificationNode(message, device.getSchemaContext()); } - if (_compositeNode != null) { - _notificationBody = NetconfDeviceListener.getNotificationBody(_compositeNode); - } - final CompositeNode domNotification = _notificationBody; - boolean _notEquals = (!Objects.equal(domNotification, null)); - if (_notEquals) { + if (domNotification != null) { MountProvisionInstance _mountInstance = null; if (this.device != null) { _mountInstance = this.device.getMountInstance();