X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fmessages%2FNetconfMessageUtil.java;h=61b23202c3a134c27d975279e2f29f7d7eefefa0;hp=49395d53d21225a20b6d47491db0e05fd03626eb;hb=60c4b0e0fd1cd965f967dacc28be58407617cb0e;hpb=567792806ed799ac649cc125bffb4debde40d254 diff --git a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageUtil.java b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageUtil.java index 49395d53d2..61b23202c3 100644 --- a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageUtil.java +++ b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageUtil.java @@ -10,21 +10,20 @@ package org.opendaylight.controller.netconf.util.messages; import com.google.common.base.Function; import com.google.common.collect.Collections2; +import java.util.Collection; +import java.util.List; +import javax.annotation.Nonnull; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; import org.opendaylight.controller.netconf.api.NetconfMessage; +import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.util.xml.XmlElement; -import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; -import javax.annotation.Nullable; -import java.util.Collection; -import java.util.List; - public final class NetconfMessageUtil { - private static final Logger logger = LoggerFactory.getLogger(NetconfMessageUtil.class); + private static final Logger LOG = LoggerFactory.getLogger(NetconfMessageUtil.class); private NetconfMessageUtil() {} @@ -65,14 +64,13 @@ public final class NetconfMessageUtil { List caps = capabilitiesElement.getChildElements(XmlNetconfConstants.CAPABILITY); return Collections2.transform(caps, new Function() { - @Nullable @Override - public String apply(@Nullable XmlElement input) { + public String apply(@Nonnull XmlElement input) { // Trim possible leading/tailing whitespace try { return input.getTextContent().trim(); } catch (NetconfDocumentedException e) { - logger.trace("Error fetching inpit text content becauese {}",e); + LOG.trace("Error fetching input text content",e); return null; } }