Checkstyle misc issues fix(Integration) 08/44108/4
authorRitu Sood <ritu.sood@intel.com>
Tue, 16 Aug 2016 03:20:07 +0000 (20:20 -0700)
committerRitu Sood <ritu.sood@intel.com>
Wed, 17 Aug 2016 18:38:52 +0000 (18:38 +0000)
Patch fixes EmptyStatement, ModifierOrder, MethodName,
LineLength, RegexpSinglelineJava checkstyle issues for
integration tests files.

Change-Id: Ia81cb6ad86831b66d6e08ecfd37a68c3bf31a624
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
integration/test/src/test/java/org/opendaylight/neutron/e2etest/ITNeutronE2E.java
integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronFirewallPolicyTests.java
integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronLBPoolMembersTests.java
integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronNetworkTests.java
integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronRouterTests.java
integration/test/src/test/java/org/opendaylight/neutron/e2etest/Tempest_PortsIpV6TestJSON.java

index bcf2cc9a9f7dd784cd5b236f8b7bf89f0ebb529c..aa052077281b8724e9fc26500668920118c308d2 100644 (file)
@@ -116,7 +116,7 @@ public class ITNeutronE2E {
         Neutron_Bug4027_Tests.runTests(base);
     }
 
-    static HttpURLConnection HttpURLConnectionFactoryGet(URL url) throws Exception {
+    static HttpURLConnection httpURLConnectionFactoryGet(URL url) throws Exception {
         HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
         httpConn.setRequestMethod("GET");
         httpConn.setRequestProperty("Content-Type", "application/json");
@@ -124,7 +124,7 @@ public class ITNeutronE2E {
         return httpConn;
     }
 
-    static HttpURLConnection HttpURLConnectionFactoryDelete(URL url) throws Exception {
+    static HttpURLConnection httpURLConnectionFactoryDelete(URL url) throws Exception {
         HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
         httpConn.setRequestMethod("DELETE");
         httpConn.setRequestProperty("Content-Type", "application/json");
@@ -132,7 +132,7 @@ public class ITNeutronE2E {
         return httpConn;
     }
 
-    static HttpURLConnection HttpURLConnectionFactoryPost(URL url, String content) throws Exception {
+    static HttpURLConnection httpURLConnectionFactoryPost(URL url, String content) throws Exception {
         HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
         httpConn.setRequestMethod("POST");
         httpConn.setRequestProperty("Content-Type", "application/json");
@@ -144,7 +144,7 @@ public class ITNeutronE2E {
         return httpConn;
     }
 
-    static HttpURLConnection HttpURLConnectionFactoryPut(URL url, String content) throws Exception {
+    static HttpURLConnection httpURLConnectionFactoryPut(URL url, String content) throws Exception {
         HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
         httpConn.setRequestMethod("PUT");
         httpConn.setRequestProperty("Content-Type", "application/json");
@@ -159,7 +159,7 @@ public class ITNeutronE2E {
     static void test_create(String url_s, String content, String context) {
         try {
             URL url = new URL(url_s);
-            HttpURLConnection httpConn = HttpURLConnectionFactoryPost(url, content);
+            HttpURLConnection httpConn = httpURLConnectionFactoryPost(url, content);
             Assert.assertEquals(context, 201, httpConn.getResponseCode());
         } catch (Exception e) {
             e.printStackTrace(); // temporary, remove me
@@ -170,7 +170,7 @@ public class ITNeutronE2E {
     static void test_modify(String url_s, String content, String context) {
         try {
             URL url = new URL(url_s);
-            HttpURLConnection httpConn = HttpURLConnectionFactoryPut(url, content);
+            HttpURLConnection httpConn = httpURLConnectionFactoryPut(url, content);
             Assert.assertEquals(context, 200, httpConn.getResponseCode());
         } catch (Exception e) {
             e.printStackTrace(); // temporary, remove me
@@ -181,7 +181,7 @@ public class ITNeutronE2E {
     static void test_fetch(String url_s, int responseCode, String context) {
         try {
             URL url = new URL(url_s);
-            HttpURLConnection httpConn = HttpURLConnectionFactoryGet(url);
+            HttpURLConnection httpConn = httpURLConnectionFactoryGet(url);
             Assert.assertEquals(context, responseCode, httpConn.getResponseCode());
         } catch (Exception e) {
             e.printStackTrace(); // temporary, remove me
@@ -201,7 +201,7 @@ public class ITNeutronE2E {
     static void test_delete(String url_s, int responseCode, String context) {
         try {
             URL url = new URL(url_s);
-            HttpURLConnection httpConn = HttpURLConnectionFactoryDelete(url);
+            HttpURLConnection httpConn = httpURLConnectionFactoryDelete(url);
             Assert.assertEquals(context, responseCode, httpConn.getResponseCode());
         } catch (Exception e) {
             e.printStackTrace(); // temporary, remove me
@@ -217,12 +217,12 @@ public class ITNeutronE2E {
         test_delete(url_s, 404, context);
     }
 
-    static private String fetchResponse(String url_s, String context) {
+    private static String fetchResponse(String url_s, String context) {
         StringBuffer response = new StringBuffer();
 
         try {
             URL url = new URL(url_s);
-            HttpURLConnection httpConn = HttpURLConnectionFactoryGet(url);
+            HttpURLConnection httpConn = httpURLConnectionFactoryGet(url);
             Assert.assertEquals(context, 200, httpConn.getResponseCode());
             BufferedReader in = new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
             String inputLine;
index 61f95ba87318e26be9ed782fa52b04b3980ba879..7efd283a0db8be2ceba4bb8d5a985c4a6214af35 100644 (file)
@@ -55,7 +55,6 @@ public class NeutronFirewallPolicyTests {
                 + "?fields=tenant_id&field=id&fields=name&fields=description"
                 + "&fields=shared&fields=firewall_rules&fields=audited"
                 + "&fields=limit&fields=marker&fields=page_reverse";
-        ;
         ITNeutronE2E.test_fetch(url, true, "Firewall Policy Element Get with Query Failed");
     }
 
index e6d8519aaa892dac3295b94db4bb89c8f4a33ce0..f6359292795c519f049dca892ed26cc04a14e940 100644 (file)
@@ -58,7 +58,6 @@ public class NeutronLBPoolMembersTests {
                 + "?fields=id&fields=tenant_id&fields=address&fields=protocol_port"
                 + "&fields=weight&fields=subnet_id&fields=admin_state_up"
                 + "&fields=limit&fields=marker&fields=page_reverse";
-        ;
         ITNeutronE2E.test_fetch(url, true, "LB Pool Member Element Get With Query Failed");
     }
 
index ca0a1c1441b6e19a16bad18f10fa8cc82883b944..6ccefa0bdc67caa287b57de9fe4e9edcc8ab0fac 100644 (file)
@@ -11,6 +11,8 @@ package org.opendaylight.neutron.e2etest;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import org.junit.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class NeutronNetworkTests {
 
@@ -18,6 +20,8 @@ public class NeutronNetworkTests {
 
     String base;
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(NeutronNetworkTests.class);
+
     public NeutronNetworkTests(String base) {
         this.base = base;
     }
@@ -28,9 +32,9 @@ public class NeutronNetworkTests {
             int i = 0;
             while (i < TIMEOUT) {
                 URL url = new URL(url_s);
-                HttpURLConnection httpConn = ITNeutronE2E.HttpURLConnectionFactoryGet(url);
+                HttpURLConnection httpConn = ITNeutronE2E.httpURLConnectionFactoryGet(url);
                 if (httpConn.getResponseCode() != 200) {
-                    System.out.println("trial " + Integer.toString(i) + ": failed with: "
+                    LOGGER.info("trial " + Integer.toString(i) + ": failed with: "
                             + Integer.toString(httpConn.getResponseCode()));
                     Thread.sleep(1000);
                     i += 1;
index fb95c45030a867a88932953568c2fce53ac06a71..f74bc720f97f8a6a96a2f7191be50107e70bfd1d 100644 (file)
@@ -95,7 +95,6 @@ public class NeutronRouterTests {
         String url = base + "/routers/8604a0de-7f6b-409a-a47c-a1cc7bc77b2f"
                 + "?fields=id&fields=admin_state_up&fields=name&fields=status"
                 + "&fields=tenant_id&fields=external_gateway_info" + "&fields=limit&fields=marker&fields=page_reverse";
-        ;
         ITNeutronE2E.test_fetch(url, true, "Router Element Get With Query Test");
     }
 
index ddab6f38ecc35d383356728048184e04f6ca27ca..f92774a4c43dffc78afc6c233d27953fd2304f8a 100644 (file)
@@ -63,7 +63,8 @@ public class Tempest_PortsIpV6TestJSON {
                 + "{\"remote_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\", "
                 + "\"direction\": \"ingress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", "
                 + "\"ethertype\": \"IPv6\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", "
-                + "\"port_range_max\": \"\", \"port_range_min\": \"\", \"id\": \"7ba1a85b-3e05-44b5-90dd-0c50fe01ac46\", "
+                + "\"port_range_max\": \"\", \"port_range_min\": \"\", "
+                + "\"id\": \"7ba1a85b-3e05-44b5-90dd-0c50fe01ac46\", "
                 + "\"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, {\"remote_group_id\": "
                 + "\"111f2d2d-4fe3-4679-b43a-17857ce91cab\", \"direction\": \"ingress\", "
                 + "\"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv4\", "