Fix checkstyle issues to enforce it 11/63011/2
authorDavid Suarez <david.suarez.fuentes@gmail.com>
Tue, 12 Sep 2017 00:04:39 +0000 (02:04 +0200)
committerDavid Suarez <david.suarez.fuentes@gmail.com>
Tue, 12 Sep 2017 07:34:49 +0000 (09:34 +0200)
Fix checkstyle issues to enforce it.

Change-Id: I4655246739b0fa44a69487314549fc00860c9ec3
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
opendaylight/config/config-persister-api/pom.xml
opendaylight/config/config-persister-api/src/main/java/org/opendaylight/controller/config/persist/api/ConfigPusher.java
opendaylight/config/config-persister-api/src/main/java/org/opendaylight/controller/config/persist/api/ConfigSnapshotHolder.java
opendaylight/config/config-persister-api/src/main/java/org/opendaylight/controller/config/persist/api/ConfigSnapshotHolderImpl.java
opendaylight/config/config-persister-api/src/main/java/org/opendaylight/controller/config/persist/api/PropertiesProvider.java
opendaylight/config/config-persister-api/src/test/java/org/opendaylight/controller/config/persist/test/PropertiesProviderTest.java

index 749c894..7dc2281 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 ba13ebb..9c4145c 100644 (file)
@@ -12,7 +12,7 @@ import java.util.SortedSet;
 public interface ConfigSnapshotHolder {
 
     /**
-     * Get XML node that should be pushed to netconf's edit-config
+     * Get XML node that should be pushed to netconf's edit-config.
      */
     String getConfigSnapshot();
 
@@ -22,5 +22,4 @@ public interface ConfigSnapshotHolder {
      * If no value is specified, return empty set instead of null
      */
     SortedSet<String> getCapabilities();
-
 }
index 0bfb975..05af40a 100644 (file)
@@ -15,7 +15,9 @@ public class ConfigSnapshotHolderImpl implements ConfigSnapshotHolder {
     private final SortedSet<String> caps;
     private final String fileName;
 
-    public ConfigSnapshotHolderImpl(final String configSnapshot, final SortedSet<String> capabilities, final String fileName) {
+    public ConfigSnapshotHolderImpl(final String configSnapshot,
+                                    final SortedSet<String> capabilities,
+                                    final String fileName) {
         this.snapshot = configSnapshot;
         this.caps = capabilities;
         this.fileName = fileName;
@@ -37,10 +39,9 @@ public class ConfigSnapshotHolderImpl implements ConfigSnapshotHolder {
 
     @Override
     public String toString() {
-        return "ConfigSnapshotHolderImpl{" +
-                "snapshot='" + snapshot + '\'' +
-                ", caps=" + caps +
-                ", fileName='" + fileName + '\'' +
-                '}';
+        return "snapshot='" + "ConfigSnapshotHolderImpl{"
+                + snapshot + '\'' + ", caps="
+                + caps + ", fileName='"
+                + fileName + '\'' + '}';
     }
 }
index 156fa58..0bea336 100644 (file)
@@ -15,10 +15,13 @@ public interface PropertiesProvider {
     String getProperty(String key);
 
     /**
+     * Get full key reporting.
+     *
      * @return prefix + key as used in getProperty method.
      */
     String getFullKeyForReporting(String key);
 
     String getPrefix();
+
     String getPropertyWithoutPrefix(String fullKey);
 }
index d47cdbd..e889681 100644 (file)
@@ -9,14 +9,16 @@ package org.opendaylight.controller.config.persist.test;
 
 import java.util.HashMap;
 import java.util.Map;
+
 import org.opendaylight.controller.config.persist.api.PropertiesProvider;
 
 public class PropertiesProviderTest implements PropertiesProvider {
-    private final Map<String,String> properties = new HashMap<>();
+    private final Map<String, String> properties = new HashMap<>();
 
-    public void addProperty(final String key, final String value){
-        properties.put(key,value);
+    public void addProperty(final String key, final String value) {
+        properties.put(key, value);
     }
+
     @Override
     public String getProperty(final String key) {
         return properties.get(key);

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.