Make utility class final 77/63977/1
authorDavid Suarez <david.suarez.fuentes@gmail.com>
Thu, 5 Oct 2017 08:49:50 +0000 (10:49 +0200)
committerDavid Suarez <david.suarez.fuentes@gmail.com>
Thu, 5 Oct 2017 08:49:50 +0000 (10:49 +0200)
- Make utility class final to avoid subclassing and implement private
constructor to avoid instantiation.
- Simplification of checkstyle plugin config relaying on the one defined
in odlparent.

Change-Id: Id35766de6dbc4ec2eab2717627a1c18b354d9aa5
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
neutron-hostconfig/vpp/pom.xml
neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/HostconfigUtil.java

index 253d3372ad916efcbed41e9d81bd263988957474..1fe52a28d84d08d93278887ecd962fc3d4a2d419 100644 (file)
         </configuration>
       </plugin>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
         <configuration>
-          <excludes>org/opendaylight/yang/gen/**,**/yang/**</excludes>
-          <consoleOutput>true</consoleOutput>
-          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
         </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>check</goal>
-            </goals>
-            <phase>process-sources</phase>
-          </execution>
-        </executions>
       </plugin>
       <plugin>
         <groupId>org.apache.felix</groupId>
index 72e0a933df60c3fefe0d601dd14d453505d0ddd3..c643d9ca36570902999f0705b09097ea54767b48 100644 (file)
@@ -19,7 +19,7 @@ import java.util.Map;
 
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 
-public class HostconfigUtil {
+public final class HostconfigUtil {
 
     static final String L2_HOST_TYPE = "ODL L2";
     private static final String VHOST_USER = "vhostuser";
@@ -28,6 +28,9 @@ public class HostconfigUtil {
     private static final String SUPPORT_VHOST_USER = "True";
     private static final List<String> SUPPORTED_NET_TYPES = Lists.newArrayList("local", "vlan", "vxlan", "gre");
 
+    private HostconfigUtil() {
+    }
+
     public static Map<String, String> createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo) {
         Preconditions.checkNotNull(nodeId);
         Preconditions.checkNotNull(socketInfo);