Enable checkstyle enforcement in openflowplugin-parent 48/67848/5
authorTom Pantelis <tompantelis@gmail.com>
Fri, 2 Feb 2018 02:41:25 +0000 (21:41 -0500)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 28 Feb 2018 17:48:25 +0000 (12:48 -0500)
This covers all code sub-projects. Also removed checkstyle
configurations in all sub-projects.

Change-Id: Ib93f4abb41e97bc4c803cd54ad1c2ea56040d3db
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
17 files changed:
applications/bulk-o-matic/pom.xml
applications/forwardingrules-manager/pom.xml
applications/lldp-speaker/pom.xml
applications/notification-supplier/pom.xml
applications/reconciliation-framework/pom.xml
applications/southbound-cli/pom.xml
applications/table-miss-enforcer/pom.xml
applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPDiscoveryListener.java
applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java
applications/topology-lldp-discovery/src/test/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAgerTest.java
applications/topology-manager/pom.xml
libraries/pom.xml
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImpl.java
openflowplugin-api/pom.xml
openflowplugin-common/pom.xml
openflowplugin-impl/pom.xml
parent/pom.xml

index 9cb413d9722316f7939198e44d7837bbd4267c84..c1dcd3a8341be902b080a44eb6894fcf08886462 100644 (file)
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index 8bf861d8a1d8893e5af136c4fcc8a0f2102e153c..ec05dd4dff972f209efce3f4b35782f2ebffa4a4 100644 (file)
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <scm>
     <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
index d0650295a1fdc97bc62198f2c641310bb82baad0..762a1ff51c76e9e92c7727357c6d92afdd72fc79 100644 (file)
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <configuration>
-                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>
index 5658935a8192ba6ccb2cfdf24ae899439c292daf..9b23bbcfd98c79247481100d738bcd099eb2bd2a 100644 (file)
             <scope>test</scope>
         </dependency>
     </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <configuration>
-                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>
index b0ab8f5f5671754c22e60910dc12d95a1c0678e0..f19bf221a620b44f4a803fa468719b53f5c8b265 100644 (file)
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <configuration>
-                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-
     <scm>
         <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
index 4973cfebe683613836a3d30e6213bca153cf8267..0e6d4d5caae1444bd77556c5336bdf1945319c2e 100644 (file)
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <configuration>
-                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>
index 1274f046c6378b6aa63344a489a4ee6a035a302b..35205ebdd275167d62068119b8054cffd022e96c 100644 (file)
       </dependency>
   </dependencies>
 
-    <build>
-     <plugins>
-         <plugin>
-             <groupId>org.apache.maven.plugins</groupId>
-             <artifactId>maven-checkstyle-plugin</artifactId>
-             <configuration>
-                 <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-             </configuration>
-         </plugin>
-     </plugins>
-    </build>
 </project>
index f8132f87d3de7e60cd8fd95c46ad9d7c51ba93ec..36ab3c7d01ddb5f26a0c43a5fedf4a76ef8bc254 100644 (file)
@@ -52,12 +52,12 @@ public class LLDPDiscoveryListener implements PacketProcessingListener {
                     LOG.debug("Publish add event for link {}", ld);
                     notificationService.publish(ld);
                 } else {
-                    LOG.trace("Skip publishing the add event for link because controller is non-owner of the " +
-                            "node {}. Link : {}", nodeKey.getId().getValue(), ld);
+                    LOG.trace("Skip publishing the add event for link because controller is non-owner of the "
+                            "node {}. Link : {}", nodeKey.getId().getValue(), ld);
                 }
             } else {
                 LOG.debug("LLDP packet ignored. Unable to extract node-key from source node-connector reference.");
             }
         }
     }
-}
\ No newline at end of file
+}
index 5c3cb23060a3791fdd09f875c60e8d2dacb9ecb2..738ba0299e819b95780a4bc32d9e823495fe7610 100644 (file)
@@ -18,16 +18,16 @@ import java.util.concurrent.ConcurrentHashMap;
 import javax.annotation.Nonnull;
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService;
-import org.opendaylight.openflowplugin.applications.topology.lldp.utils.LLDPDiscoveryUtils;
 import org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationListener;
 import org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService;
+import org.opendaylight.openflowplugin.applications.topology.lldp.utils.LLDPDiscoveryUtils;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.LinkDiscovered;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.LinkRemovedBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 
 public class LLDPLinkAger implements ConfigurationListener, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(LLDPLinkAger.class);
index 387db0a7aa46cc6408a2a0c0ddd92fccde016b5b..2645cefde98b84971c76a66d07a414433c17e4e6 100644 (file)
@@ -32,10 +32,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.NonZeroUint32Type;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfigBuilder;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -71,7 +71,8 @@ public class LLDPLinkAgerTest {
         lldpLinkAger = new LLDPLinkAger(getConfig(), notificationService, getConfigurationService(), eos);
         Mockito.when(link.getDestination()).thenReturn(new NodeConnectorRef(
                 InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(new NodeId("openflow:1")))));
-        Mockito.when(eos.getOwnershipState(Mockito.any(Entity.class))).thenReturn(Optional.of(EntityOwnershipState.IS_OWNER));
+        Mockito.when(eos.getOwnershipState(Mockito.any(Entity.class))).thenReturn(
+                Optional.of(EntityOwnershipState.IS_OWNER));
     }
 
     @Test
index 763cc68e77659c30d49483b713f423ba03ae9f38..5ecfd8f06a65bf50830df154ab015ef97e2608a0 100644 (file)
     <tag>HEAD</tag>
   </scm>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
 </project>
index 4f317687c4e66c095f36d189a7e40bfac1fbc5d8..7afa1815b5e4e2e993f771d83ab5982957c34595 100644 (file)
 
     <build>
         <plugins>
-            <!-- TODO: Fix checkstyle issues later
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <configuration>
-                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-                </configuration>
-            </plugin>
-            -->
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
@@ -42,4 +33,4 @@
     <modules>
         <module>liblldp</module>
     </modules>
-</project>
\ No newline at end of file
+</project>
index 3ea7a8d3069bf330104f95a4f6603194e634a9ee..65729220b49b9a5d026fe7a822f8e0135912e761 100644 (file)
@@ -142,8 +142,8 @@ public class ConnectionAdapterImpl extends AbstractConnectionAdapterStatistics i
 
             if (alienMessageListener != null && alienMessageListener.onAlienMessage((OfHeader) message)) {
                 LOG.debug("Alien message {} received", message.getImplementedInterface());
-            } else if (outputManager == null || !outputManager.onMessage((OfHeader) message) || message instanceof
-                    EchoOutput) {
+            } else if (outputManager == null || !outputManager.onMessage((OfHeader) message)
+                    || message instanceof EchoOutput) {
                 final RpcResponseKey key = createRpcResponseKey((OfHeader) message);
                 final ResponseExpectedRpcListener<?> listener = findRpcResponse(key);
                 if (listener != null) {
@@ -183,12 +183,7 @@ public class ConnectionAdapterImpl extends AbstractConnectionAdapterStatistics i
         versionDetector = (OFVersionDetector) channel.pipeline().get(PipelineHandlers.OF_VERSION_DETECTOR.name());
         Preconditions.checkState(versionDetector != null);
 
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                connectionReadyListener.onConnectionReady();
-            }
-        }).start();
+        new Thread(() -> connectionReadyListener.onConnectionReady()).start();
     }
 
     @Override
index 5993c647c81d7e9595f662dea4b710425b2c4a67..693889d51a10bbf8bc5aa1c2d0ba461824d1e30f 100644 (file)
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <configuration>
-                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-                </configuration>
-            </plugin>
             <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>findbugs-maven-plugin</artifactId>
index 1764fcbbe9a4bdb190d41f5455395e65fc568983..00be22ad1dffec3abf16e2ccf372742551fd99a2 100644 (file)
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>findbugs-maven-plugin</artifactId>
index f785e83ca0678f9fdd1518230de6acf6f09f08b1..94d49d603562365ae5462be2fbccde5a8687e930 100644 (file)
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <configuration>
-                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
index fd1617b89823c81b63145bd94b0c8d85a443597b..9f360bfd179eae59151f585976f464d56b0decaf 100644 (file)
 
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>