Fix checkstyle 64/85264/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Sep 2019 07:20:52 +0000 (09:20 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 20 Oct 2019 08:44:35 +0000 (10:44 +0200)
Updated checkstyle is finding some issues, fix them up.

Change-Id: Id17bc94b4fdd2b8883dedc5e8736f9e1971aa900
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1cb9037cc1a5e94001710d184748e0f752aec672)

netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/xml/XmlNetconfConstants.java
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/NetconfUtil.java
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/messages/NetconfMessageUtil.java
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/messages/SendErrorExceptionUtil.java
netconf/netconf-util/src/test/java/org/opendaylight/netconf/util/test/XmlUnitUtil.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/util/NetconfMessageTransformUtil.java

index fa9ceececd4cd00251fd240d1dc4851b8dd46ca9..3b45aad1ccd641080f7d2eca16369f0f3a77e56d 100644 (file)
@@ -8,8 +8,9 @@
 package org.opendaylight.netconf.api.xml;
 
 public final class XmlNetconfConstants {
+    private XmlNetconfConstants() {
 
-    private XmlNetconfConstants() {}
+    }
 
     public static final String CAPABILITY = "capability";
     public static final String CAPABILITIES = "capabilities";
index eb3613534a15bd31a411b670ed9a1e063a2ccd83..d47c86d10af5c76f179824d3372309f5c583b2cb 100644 (file)
@@ -40,7 +40,9 @@ public final class NetconfUtil {
         XML_FACTORY.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, false);
     }
 
-    private NetconfUtil() {}
+    private NetconfUtil() {
+
+    }
 
     public static Document checkIsMessageOk(final Document response) throws DocumentedException {
         XmlElement element = XmlElement.fromDomDocument(response);
index a0c2db36c4f634d1a630a6819cb4ceafac8a3cd6..78ba588ad49f332474a70222974773fe37b134e4 100644 (file)
@@ -25,7 +25,9 @@ public final class NetconfMessageUtil {
 
     private static final Logger LOG = LoggerFactory.getLogger(NetconfMessageUtil.class);
 
-    private NetconfMessageUtil() {}
+    private NetconfMessageUtil() {
+
+    }
 
     public static boolean isOKMessage(final NetconfMessage message) throws NetconfDocumentedException {
         return isOKMessage(message.getDocument());
index 11ad160a26aff8fd8d57725cd0a0b716bb007fdf..4f93674224edd29c5d5465a69ffc9882b6669510 100644 (file)
@@ -28,7 +28,9 @@ import org.w3c.dom.NamedNodeMap;
 public final class SendErrorExceptionUtil {
     private static final Logger LOG = LoggerFactory.getLogger(SendErrorExceptionUtil.class);
 
-    private SendErrorExceptionUtil() {}
+    private SendErrorExceptionUtil() {
+
+    }
 
     public static void sendErrorMessage(final NetconfSession session,
             final DocumentedException sendErrorException) {
index 78fc364032b4be4fffb38c6025955f28cc88e222..f774213a03f3c3b1a43aef691ae3de88daeba0ee 100644 (file)
@@ -23,8 +23,9 @@ import org.w3c.dom.Node;
 import org.w3c.dom.Text;
 
 public final class XmlUnitUtil {
+    private XmlUnitUtil() {
 
-    private XmlUnitUtil() {}
+    }
 
     public static void assertContainsElementWithText(final Document doc,
                                                      final String textToFind) throws NodeTestException {
@@ -34,7 +35,7 @@ public final class XmlUnitUtil {
             boolean textFound = false;
 
             @Override
-            public void testText(Text text) throws NodeTestException {
+            public void testText(final Text text) throws NodeTestException {
                 if (!textFound) {
                     if (text.getData().equalsIgnoreCase(textToFind)) {
                         textFound = true;
@@ -43,7 +44,7 @@ public final class XmlUnitUtil {
             }
 
             @Override
-            public void noMoreNodes(NodeTest forTest) throws NodeTestException {
+            public void noMoreNodes(final NodeTest forTest) throws NodeTestException {
                 assertTrue(textFound);
             }
         };
@@ -57,7 +58,7 @@ public final class XmlUnitUtil {
             private boolean elementFound = false;
 
             @Override
-            public void testElement(Element element) throws NodeTestException {
+            public void testElement(final Element element) throws NodeTestException {
                 if (!elementFound) {
                     if (element.isEqualNode(testElement)) {
                         elementFound = true;
@@ -66,7 +67,7 @@ public final class XmlUnitUtil {
             }
 
             @Override
-            public void noMoreNodes(NodeTest forTest) throws NodeTestException {
+            public void noMoreNodes(final NodeTest forTest) throws NodeTestException {
                 assertTrue(elementFound);
             }
         };
@@ -81,7 +82,7 @@ public final class XmlUnitUtil {
             private boolean elementFound = false;
 
             @Override
-            public void testElement(Element element) throws NodeTestException {
+            public void testElement(final Element element) throws NodeTestException {
                 if (!elementFound) {
                     if (element.getNodeName() != null && element.getNodeName().equals(elementName)) {
                         elementFound = true;
@@ -90,7 +91,7 @@ public final class XmlUnitUtil {
             }
 
             @Override
-            public void noMoreNodes(NodeTest forTest) throws NodeTestException {
+            public void noMoreNodes(final NodeTest forTest) throws NodeTestException {
                 assertTrue(XmlUtil.toString(doc), elementFound);
             }
         };
@@ -104,14 +105,14 @@ public final class XmlUnitUtil {
             private int elementFound = 0;
 
             @Override
-            public void testElement(Element element) throws NodeTestException {
+            public void testElement(final Element element) throws NodeTestException {
                 if (element.getNodeName() != null && element.getNodeName().equals(elementName)) {
                     elementFound++;
                 }
             }
 
             @Override
-            public void noMoreNodes(NodeTest forTest) throws NodeTestException {
+            public void noMoreNodes(final NodeTest forTest) throws NodeTestException {
                 assertEquals(expectedCount, elementFound);
             }
         };
index a0c8ca7ef941993cc944075017a62c4574f703d3..83d903b686d9ce993a9fb3249d5957b0338ce5d9 100644 (file)
@@ -88,7 +88,9 @@ public final class NetconfMessageTransformUtil {
     private static final Document BLANK_DOCUMENT = XmlUtil.newDocument();
     public static final String EVENT_TIME = "eventTime";
 
-    private NetconfMessageTransformUtil() {}
+    private NetconfMessageTransformUtil() {
+
+    }
 
     public static final QName IETF_NETCONF_MONITORING =
             QName.create(NetconfState.QNAME, "ietf-netconf-monitoring").intern();