Fix checkstyle 64/84664/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Sep 2019 07:20:52 +0000 (09:20 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 23 Sep 2019 12:40:16 +0000 (14:40 +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/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 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 06fa0c4f6198c6c5da9b8d07a3ae35a9cbc58308..ea62c9dd84856f7c8213f32185b9f587aa812296 100644 (file)
@@ -93,7 +93,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();