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=3e8040ad8a1d87e916415795e08e38814963537b;hb=12f2638b091a56ffb61daa70f8f1511c77e655e1;hpb=bed5d205984b6830851cdb6b8dad931d4ce59dda 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 3e8040ad8a..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,7 +10,9 @@ 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; @@ -19,14 +21,9 @@ 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() {} @@ -67,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; } }