X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2FNetconfServerSessionNegotiatorFactory.java;h=9ffb8da1dd975fc6592e2b789e49e7f5492e0069;hp=6fce8d333ad49b28f7365c2c3dc8555432528c8c;hb=1745f92957146128e8a4a111adb7ed830f737e0a;hpb=f776809962df87deeaa533ba995cc6fceba64d0e diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionNegotiatorFactory.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionNegotiatorFactory.java index 6fce8d333a..9ffb8da1dd 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionNegotiatorFactory.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionNegotiatorFactory.java @@ -8,10 +8,15 @@ package org.opendaylight.controller.netconf.impl; -import com.google.common.base.Preconditions; import io.netty.channel.Channel; import io.netty.util.Timer; import io.netty.util.concurrent.Promise; + +import java.io.InputStream; + +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpression; + import org.opendaylight.controller.netconf.api.NetconfServerSessionPreferences; import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider; import org.opendaylight.controller.netconf.impl.osgi.SessionMonitoringService; @@ -29,9 +34,8 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; -import java.io.InputStream; +import com.google.common.base.Optional; +import com.google.common.base.Preconditions; import static org.opendaylight.controller.netconf.mapping.api.NetconfOperationProvider.NetconfOperationProviderUtil.getNetconfSessionIdForReporting; @@ -113,7 +117,7 @@ public class NetconfServerSessionNegotiatorFactory implements SessionNegotiatorF XPathConstants.NODE); for (String capability : capabilityProvider.getCapabilities()) { - final Element capabilityElement = helloMessageTemplate.createElement(XmlNetconfConstants.CAPABILITY); + final Element capabilityElement = XmlUtil.createElement(helloMessageTemplate, XmlNetconfConstants.CAPABILITY, Optional.absent()); capabilityElement.setTextContent(capability); capabilitiesElement.appendChild(capabilityElement); }