Fix checkstyle issues to enforce it.
Change-Id: I4655246739b0fa44a69487314549fc00860c9ec3
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
<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>
package org.opendaylight.controller.config.persist.api;
import java.util.List;
+
/*
* The config pusher service pushes configs into the config subsystem
*/
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();
* If no value is specified, return empty set instead of null
*/
SortedSet<String> getCapabilities();
-
}
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;
@Override
public String toString() {
- return "ConfigSnapshotHolderImpl{" +
- "snapshot='" + snapshot + '\'' +
- ", caps=" + caps +
- ", fileName='" + fileName + '\'' +
- '}';
+ return "snapshot='" + "ConfigSnapshotHolderImpl{"
+ + snapshot + '\'' + ", caps="
+ + caps + ", fileName='"
+ + fileName + '\'' + '}';
}
}
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);
}
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);