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%2FDefaultGetSchema.java;h=53107048760dbee1ae27f23be7977b15481ba39a;hp=beceb8d008cb6e6b61662cf16f6ea32bd31981ed;hb=ecd49a2e11021576f51052ad54f785c9b0e65122;hpb=d7a972ac145d9f0ac8870dac2d7835520e92c02a diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchema.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchema.java index beceb8d008..5310704876 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchema.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchema.java @@ -10,26 +10,25 @@ package org.opendaylight.controller.netconf.impl.mapping.operations; import com.google.common.base.Optional; import com.google.common.collect.Maps; +import java.util.Map; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; +import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider; import org.opendaylight.controller.netconf.util.exception.MissingNameSpaceException; import org.opendaylight.controller.netconf.util.mapping.AbstractLastNetconfOperation; 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.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; -import java.util.Map; - public final class DefaultGetSchema extends AbstractLastNetconfOperation { public static final String GET_SCHEMA = "get-schema"; public static final String IDENTIFIER = "identifier"; public static final String VERSION = "version"; - private static final Logger logger = LoggerFactory.getLogger(DefaultGetSchema.class); + private static final Logger LOG = LoggerFactory.getLogger(DefaultGetSchema.class); private final CapabilityProvider cap; public DefaultGetSchema(CapabilityProvider cap, String netconfSessionIdForReporting) { @@ -59,7 +58,7 @@ public final class DefaultGetSchema extends AbstractLastNetconfOperation { } catch (IllegalStateException e) { Map errorInfo = Maps.newHashMap(); errorInfo.put(entry.identifier, e.getMessage()); - logger.warn("Rpc error: {}", NetconfDocumentedException.ErrorTag.operation_failed, e); + LOG.warn("Rpc error: {}", NetconfDocumentedException.ErrorTag.operation_failed, e); throw new NetconfDocumentedException(e.getMessage(), NetconfDocumentedException.ErrorType.application, NetconfDocumentedException.ErrorTag.operation_failed, NetconfDocumentedException.ErrorSeverity.error, errorInfo); @@ -68,7 +67,7 @@ public final class DefaultGetSchema extends AbstractLastNetconfOperation { Element getSchemaResult; getSchemaResult = XmlUtil.createTextElement(document, XmlNetconfConstants.DATA_KEY, schema, Optional.of(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_YANG_IETF_NETCONF_MONITORING)); - logger.trace("{} operation successful", GET_SCHEMA); + LOG.trace("{} operation successful", GET_SCHEMA); return getSchemaResult; } @@ -85,7 +84,7 @@ public final class DefaultGetSchema extends AbstractLastNetconfOperation { try { identifierElement = getSchemaElement.getOnlyChildElementWithSameNamespace(IDENTIFIER); } catch (MissingNameSpaceException e) { - logger.trace("Can't get identifier element as only child element with same namespace due to {}",e); + LOG.trace("Can't get identifier element as only child element with same namespace due to ",e); throw NetconfDocumentedException.wrap(e); } identifier = identifierElement.getTextContent();