Fix checkstyle warnings in netconf-util 66/12866/8
authorMarian Dubai <mdubai@cisco.com>
Fri, 14 Nov 2014 15:25:53 +0000 (16:25 +0100)
committerMarian Dubai <mdubai@cisco.com>
Thu, 27 Nov 2014 09:54:39 +0000 (09:54 +0000)
Change-Id: I0fbe00cc76f3b84a8b2673f1716b8ceb08c2b52b
Signed-off-by: Marian Dubai <mdubai@cisco.com>
29 files changed:
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/NetconfUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/exception/MissingNameSpaceException.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/exception/UnexpectedElementException.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/exception/UnexpectedNamespaceException.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessage.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessageAdditionalHeader.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageHeader.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/SendErrorExceptionUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/osgi/NetconfConfigUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/HardcodedNamespaceResolver.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XMLNetconfUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XmlElement.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XmlNetconfValidator.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XmlUtil.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/mapping/AbstractLastNetconfOperationTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/mapping/AbstractNetconfOperationTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/mapping/AbstractSingletonNetconfOperationTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessageAdditionalHeaderTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessageTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageHeaderTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageUtilTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/messages/SendErrorExceptionUtilTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/osgi/NetconfConfigUtilTest.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/test/XmlFileLoader.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/xml/XmlElementTest.java
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/startExi.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/stopExi.xml

index 0269bcccb989492e69b616fc955545ca49509f31..5fd53dce55639e0b5c8a811e11ab4b7b2a637117 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.controller.netconf.util;
 
 import com.google.common.base.Preconditions;
-
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
@@ -19,7 +18,7 @@ import org.w3c.dom.Document;
 
 public final class NetconfUtil {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfUtil.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfUtil.class);
 
     private NetconfUtil() {}
 
@@ -30,7 +29,7 @@ public final class NetconfUtil {
         if (element.getName().equals(XmlNetconfConstants.OK)) {
             return response;
         }
-        logger.warn("Can not load last configuration. Operation failed.");
+        LOG.warn("Can not load last configuration. Operation failed.");
         throw new IllegalStateException("Can not load last configuration. Operation failed: "
                 + XmlUtil.toString(response));
     }
index 6cc5006aba4ba7f9266935564911905d9b364b58..d2a6d2b58d237069ae67bd3c6a514ea5bfd090f6 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.netconf.util.exception;
 
 import java.util.Collections;
 import java.util.Map;
-
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 
 public class MissingNameSpaceException extends NetconfDocumentedException {
index 7b5f52e3967178c8e30da453a06662994e054093..6d7c7ca7c434a884411822f2065096083cbe812e 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.netconf.util.exception;
 
 import java.util.Collections;
 import java.util.Map;
-
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 
 public class UnexpectedElementException extends NetconfDocumentedException {
index 582fd23e16e7576c4b4c0622216f4db6f505f10f..4a19390b362f9358aff0db32d6e705b4bba16bbd 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.netconf.util.exception;
 
 import java.util.Collections;
 import java.util.Map;
-
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 
 public class UnexpectedNamespaceException extends NetconfDocumentedException {
index 15223cb60ba994472cdedc939a6586f569471593..5cd17a2331e293c23d064c9acd535e021de43c8e 100644 (file)
@@ -8,11 +8,12 @@
 
 package org.opendaylight.controller.netconf.util.messages;
 
-import org.opendaylight.controller.netconf.api.NetconfMessage;
-
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
 import java.util.Set;
-
 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.exception.MissingNameSpaceException;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
@@ -20,10 +21,6 @@ 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 com.google.common.base.Preconditions;
-import com.google.common.collect.Sets;
-
 /**
  * NetconfMessage that can carry additional header with session metadata. See {@link org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader}
  */
index fa26455c9875d7245429ef72f2ce11b57c56acac..ac8a557d9ae359c8d5425f88ae7385905eaf9552 100644 (file)
@@ -8,10 +8,9 @@
 
 package org.opendaylight.controller.netconf.util.messages;
 
-import java.nio.ByteBuffer;
-
 import com.google.common.base.Charsets;
 import com.google.common.base.Preconditions;
+import java.nio.ByteBuffer;
 
 /**
  * Netconf message header is used only when chunked framing mechanism is
index c532b7f9a6f235a0eebc7dc4a53bc10f2208dbc4..61b23202c3a134c27d975279e2f29f7d7eefefa0 100644 (file)
@@ -23,7 +23,7 @@ import org.w3c.dom.Document;
 
 public final class NetconfMessageUtil {
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfMessageUtil.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfMessageUtil.class);
 
     private NetconfMessageUtil() {}
 
@@ -70,7 +70,7 @@ public final class NetconfMessageUtil {
                 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;
                 }
             }
index 6604834fe42c02b3b3188fd7cd7f85c7b887ff3d..fe5ed03320cdd3b921e0c6d056d89b4d3381a58c 100644 (file)
@@ -9,14 +9,12 @@
 package org.opendaylight.controller.netconf.util.messages;
 
 import com.google.common.base.Preconditions;
-
 import io.netty.channel.Channel;
 import io.netty.channel.ChannelFuture;
 import io.netty.channel.ChannelFutureListener;
-
-import org.opendaylight.controller.netconf.api.NetconfSession;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
+import org.opendaylight.controller.netconf.api.NetconfSession;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.slf4j.Logger;
@@ -27,20 +25,20 @@ import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 
 public final class SendErrorExceptionUtil {
-    private static final Logger logger = LoggerFactory.getLogger(SendErrorExceptionUtil.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SendErrorExceptionUtil.class);
 
     private SendErrorExceptionUtil() {}
 
     public static void sendErrorMessage(final NetconfSession session,
             final NetconfDocumentedException sendErrorException) {
-        logger.trace("Sending error {}", sendErrorException.getMessage(), sendErrorException);
+        LOG.trace("Sending error {}", sendErrorException.getMessage(), sendErrorException);
         final Document errorDocument = createDocument(sendErrorException);
         ChannelFuture f = session.sendMessage(new NetconfMessage(errorDocument));
         f.addListener(new SendErrorVerifyingListener(sendErrorException));
     }
 
     public static void sendErrorMessage(Channel channel, NetconfDocumentedException sendErrorException) {
-        logger.trace("Sending error {}", sendErrorException.getMessage(), sendErrorException);
+        LOG.trace("Sending error {}", sendErrorException.getMessage(), sendErrorException);
         final Document errorDocument = createDocument(sendErrorException);
         ChannelFuture f = channel.writeAndFlush(new NetconfMessage(errorDocument));
         f.addListener(new SendErrorVerifyingListener(sendErrorException));
@@ -49,7 +47,7 @@ public final class SendErrorExceptionUtil {
     public static void sendErrorMessage(NetconfSession session, NetconfDocumentedException sendErrorException,
             NetconfMessage incommingMessage) {
         final Document errorDocument = createDocument(sendErrorException);
-        logger.trace("Sending error {}", XmlUtil.toString(errorDocument));
+        LOG.trace("Sending error {}", XmlUtil.toString(errorDocument));
         tryToCopyAttributes(incommingMessage.getDocument(), errorDocument, sendErrorException);
         ChannelFuture f = session.sendMessage(new NetconfMessage(errorDocument));
         f.addListener(new SendErrorVerifyingListener(sendErrorException));
@@ -76,7 +74,7 @@ public final class SendErrorExceptionUtil {
                 rpcReply.setAttributeNode((Attr) errorDocument.importNode(attr, true));
             }
         } catch (final Exception e) {
-            logger.warn("Unable to copy incomming attributes to {}, returned rpc-error might be invalid for client",
+            LOG.warn("Unable to copy incomming attributes to {}, returned rpc-error might be invalid for client",
                     sendErrorException, e);
         }
     }
index c77e0d7da25dc112e54489fbae42bf317a3f2b3f..64aeebd54205c658cad64589994a436282cbdb5b 100644 (file)
@@ -16,7 +16,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public final class NetconfConfigUtil {
-    private static final Logger logger = LoggerFactory.getLogger(NetconfConfigUtil.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfConfigUtil.class);
 
     private static final String PREFIX_PROP = "netconf.";
 
@@ -48,7 +48,7 @@ public final class NetconfConfigUtil {
         try {
             return Long.parseLong(timeoutString);
         } catch (final NumberFormatException e) {
-            logger.warn("Cannot parse {} property: {}, using defaults", key, timeoutString, e);
+            LOG.warn("Cannot parse {} property: {}, using defaults", key, timeoutString, e);
             return DEFAULT_TIMEOUT_MILLIS;
         }
     }
@@ -89,7 +89,7 @@ public final class NetconfConfigUtil {
             try {
                 return Optional.of(parseAddress(address, port));
             } catch (final RuntimeException e) {
-                logger.warn("Unable to parse {} netconf address from {}:{}, fallback to default",
+                LOG.warn("Unable to parse {} netconf address from {}:{}, fallback to default",
                         infixProp, address, port, e);
             }
         }
index 23fe7cdf41e1b5cc9266f53a3f8694316311daa1..87ecb2de090ec8813d0bd0215cde1ade3bfcddd9 100644 (file)
@@ -8,14 +8,12 @@
 
 package org.opendaylight.controller.netconf.util.xml;
 
+import com.google.common.collect.ImmutableMap;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map;
-
 import javax.xml.namespace.NamespaceContext;
 
-import com.google.common.collect.ImmutableMap;
-
 // http://www.ibm.com/developerworks/library/x-nmspccontext/
 public class HardcodedNamespaceResolver implements NamespaceContext {
     private final Map<String/* prefix */, String/* namespace */> prefixesToNamespaces;
index e7ce4541559943e86983e2e83285ff0d0b9c18e6..eaaf320b023c454f5638a0f2138d262c312d0d1d 100644 (file)
@@ -12,7 +12,6 @@ import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
-
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 
 public final class XMLNetconfUtil {
index 3c63204881aa9ea0ef3e0909ad302e73187d5b31..e17cad977ce13dd254b996ebb9a31122fe6a87e0 100644 (file)
@@ -40,7 +40,7 @@ public final class XmlElement {
     public static final String DEFAULT_NAMESPACE_PREFIX = "";
 
     private final Element element;
-    private static final Logger logger = LoggerFactory.getLogger(XmlElement.class);
+    private static final Logger LOG = LoggerFactory.getLogger(XmlElement.class);
 
     private XmlElement(Element element) {
         this.element = element;
@@ -132,7 +132,7 @@ public final class XmlElement {
 
     public void checkNamespace(String expectedNamespace) throws UnexpectedNamespaceException, MissingNameSpaceException {
         if (!getNamespace().equals(expectedNamespace))
-       {
+        {
             throw new UnexpectedNamespaceException(String.format("Unexpected namespace %s should be %s",
                     getNamespace(),
                     expectedNamespace),
@@ -405,7 +405,7 @@ public final class XmlElement {
             try {
                 sb.append(", namespace='").append(getNamespace()).append('\'');
             } catch (MissingNameSpaceException e) {
-                logger.trace("Missing namespace for element.");
+                LOG.trace("Missing namespace for element.");
             }
         }
         sb.append('}');
index 8108c8e7402fac29469cf7804efd96e1dc6455df..bdab8c6209184d1262542bcd1b25b7d171157919 100644 (file)
@@ -8,19 +8,16 @@
 
 package org.opendaylight.controller.netconf.util.xml;
 
+import com.google.common.base.Preconditions;
 import java.io.IOException;
 import java.io.InputStream;
-
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.Validator;
-
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
-import com.google.common.base.Preconditions;
-
 public final class XmlNetconfValidator {
 
     private static final Schema SCHEMA;
index 9e227ee05d6d9839c1f547ec5b53f1ff5b9f9a67..68c4d9fdab62413378eb2332ada310df601bf48e 100644 (file)
@@ -10,14 +10,12 @@ package org.opendaylight.controller.netconf.util.xml;
 
 import com.google.common.base.Charsets;
 import com.google.common.base.Optional;
-
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringWriter;
-
 import javax.xml.XMLConstants;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
@@ -35,7 +33,6 @@ import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
 import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathExpressionException;
-
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -124,7 +121,7 @@ public final class XmlUtil {
     public static Element createTextElementWithNamespacedContent(Document document, String qName, String prefix,
                                                                  String namespace, String contentWithoutPrefix) {
 
-       return createTextElementWithNamespacedContent(document, qName, prefix, namespace, contentWithoutPrefix, Optional.<String>absent());
+        return createTextElementWithNamespacedContent(document, qName, prefix, namespace, contentWithoutPrefix, Optional.<String>absent());
     }
 
     public static Element createTextElementWithNamespacedContent(Document document, String qName, String prefix,
index 47d0d4c7ccc56294d85e753f603e6c8bd951f2c0..dc175c57337205c27f76b03cd55c8af9ecf774fd 100644 (file)
@@ -7,9 +7,10 @@
  */
 package org.opendaylight.controller.netconf.util;
 
-import static org.hamcrest.CoreMatchers.containsString;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
+import static org.hamcrest.CoreMatchers.containsString;
+
 import org.junit.Test;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
index 62633dd3f25c45d704ab624f5e8d161ecc99c9f5..a6d1d5b999bcfa0757ec12b5aa13db0f2485d400 100644 (file)
@@ -8,6 +8,11 @@
 
 package org.opendaylight.controller.netconf.util.mapping;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
@@ -17,11 +22,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlElement;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-
 public class AbstractLastNetconfOperationTest {
     class LastNetconfOperationImplTest extends  AbstractLastNetconfOperation  {
 
index ea4a6e61f23aecd32e2a4261438d5e46f416d328..c7f6321e2c2c22d6c5893af56e76817790ca7323 100644 (file)
@@ -8,6 +8,11 @@
 
 package org.opendaylight.controller.netconf.util.mapping;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
 import java.io.IOException;
 import org.junit.Before;
 import org.junit.Test;
@@ -21,11 +26,6 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
 public class AbstractNetconfOperationTest {
 
     class NetconfOperationImpl extends AbstractNetconfOperation {
index d1310de3e20999857cc1f5829e42c853621f9be4..911b73f097ffad0c24af495e3cc39ce113bba617 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.controller.netconf.util.mapping;
 
+import static org.junit.Assert.assertEquals;
+
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.mapping.api.HandlingPriority;
@@ -15,8 +17,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlElement;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import static org.junit.Assert.assertEquals;
-
 public class AbstractSingletonNetconfOperationTest {
     class SingletonNCOperationImpl extends AbstractSingletonNetconfOperation {
 
index 95c91243af7a9e4b135f388c085e2543601c5bb0..5e50eb93fb1f62d43799a5bb510b07c4f52a22ff 100644 (file)
@@ -8,11 +8,11 @@
 
 package org.opendaylight.controller.netconf.util.messages;
 
+import static org.junit.Assert.assertEquals;
+
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-
 public class NetconfHelloMessageAdditionalHeaderTest {
 
 
index 5a9d07f6b1689455eae43a6dff82f6c5984803b7..4e157186ff911fed6a974709e703566080ffaa5d 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.controller.netconf.util.messages;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+
 import com.google.common.base.Optional;
 import java.util.Set;
 import org.junit.Before;
index d5ff3380d28b7493b1b7e18962fc1bdbc4505e16..05c31be3957b712a0418187efdad7546088b553e 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.netconf.util.messages;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
+
 import com.google.common.base.Charsets;
 import org.junit.Test;
 
index 2af34e957e2505917117ac0bc758e86ed3ee8aad..12769f5ed371473680ee2e3c5bb1dfec49866b95 100644 (file)
@@ -8,15 +8,15 @@
 
 package org.opendaylight.controller.netconf.util.messages;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Collection;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
 import org.opendaylight.controller.netconf.util.test.XmlFileLoader;
 import org.w3c.dom.Document;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 public class NetconfMessageUtilTest {
     @Test
     public void testNetconfMessageUtil() throws Exception {
index c8d562cb9c645879bbdaa868d227b675367e3e76..20287741b9fd57532a8fb4007ae320c517f34540 100644 (file)
@@ -8,6 +8,12 @@
 
 package org.opendaylight.controller.netconf.util.messages;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import io.netty.channel.Channel;
 import io.netty.channel.ChannelFuture;
 import io.netty.util.concurrent.GenericFutureListener;
@@ -19,9 +25,6 @@ import org.opendaylight.controller.netconf.api.NetconfSession;
 import org.opendaylight.controller.netconf.util.test.XmlFileLoader;
 import org.w3c.dom.Document;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
-
 public class SendErrorExceptionUtilTest {
 
     NetconfSession netconfSession;
index ebee41145ab1d77c2296bf21ded57c83b172d98e..1a701057aa0ac8a4b2addc87af37b58582b24a46 100644 (file)
@@ -13,6 +13,7 @@ import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
+
 import com.google.common.base.Optional;
 import io.netty.channel.local.LocalAddress;
 import java.net.InetSocketAddress;
index 457dda3080fa48adb18e170ba1e36d01d10513f6..e1331b1380935e86bad9fa962060e8c02210ce24 100644 (file)
@@ -8,23 +8,20 @@
 
 package org.opendaylight.controller.netconf.util.test;
 
+import com.google.common.base.Charsets;
+import com.google.common.base.Preconditions;
+import com.google.common.io.CharStreams;
+import com.google.common.io.InputSupplier;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-
 import javax.xml.parsers.ParserConfigurationException;
-
 import org.opendaylight.controller.netconf.api.NetconfMessage;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
 
-import com.google.common.base.Charsets;
-import com.google.common.base.Preconditions;
-import com.google.common.io.CharStreams;
-import com.google.common.io.InputSupplier;
-
 public class XmlFileLoader {
 
     public static NetconfMessage xmlFileToNetconfMessage(final String fileName) throws IOException, SAXException,
index a88de956e2f336704ce9af6895b9cf7285ce7f2b..22210a394e6a344cdb66df27af19662777c65b59 100644 (file)
@@ -17,6 +17,7 @@ import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import com.google.common.base.Optional;
 import java.util.Map;
 import org.junit.Before;
 import org.junit.Test;
@@ -25,8 +26,6 @@ import org.opendaylight.controller.netconf.util.exception.MissingNameSpaceExcept
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Optional;
-
 public class XmlElementTest {
 
     private final String elementAsString = "<top xmlns=\"namespace\" xmlns:a=\"attrNamespace\" a:attr1=\"value1\" attr2=\"value2\">" +
index 5e94ac6110ca73d84817222f566cf965ff01d62d..0af445f17dea163739f22bf5e7bfd91242768045 100644 (file)
@@ -6,4 +6,4 @@
 <lexical-values/>
 </fidelity>
 </start-exi>
-</rpc>
+</rpc>
\ No newline at end of file
index 170c753993f174d5aeeba66ca7e157ec5a7ad757..7f1fe849e81e41ee7585660395e5443f451f0483 100644 (file)
@@ -1,3 +1,3 @@
 <rpc message-id="a" a="64" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <stop-exi xmlns="urn:ietf:params:xml:ns:netconf:exi:1.0"/>
-</rpc>
+</rpc>
\ No newline at end of file