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%2Fmapping%2Foperations%2FDefaultCloseSession.java;h=f31233987e97531a563fca3f186fee480e6b6616;hp=8bc93e051253098fdadd361c3fd4a87d23dd8a4a;hb=b23703bef6c3aaafe2dc83608a03b738ad42f945;hpb=d651368d83292f7226a4e91adb55de98036c228f diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java index 8bc93e0512..f31233987e 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java @@ -8,15 +8,18 @@ package org.opendaylight.controller.netconf.impl.mapping.operations; -import java.util.Collections; - import org.opendaylight.controller.netconf.api.NetconfDocumentedException; import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation; import org.opendaylight.controller.netconf.util.xml.XmlElement; import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; +import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; +import com.google.common.base.Optional; + +import java.util.Collections; + public class DefaultCloseSession extends AbstractSingletonNetconfOperation { public static final String CLOSE_SESSION = "close-session"; private final AutoCloseable sessionResources; @@ -48,6 +51,6 @@ public class DefaultCloseSession extends AbstractSingletonNetconfOperation { NetconfDocumentedException.ErrorSeverity.error, Collections.singletonMap( NetconfDocumentedException.ErrorSeverity.error.toString(), e.getMessage())); } - return document.createElement(XmlNetconfConstants.OK); + return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent()); } }