fixed sonar bugs

This commit is contained in:
jomu
2015-02-21 20:35:01 +00:00
parent 3446688528
commit 2bdf8a9e68
3 changed files with 13 additions and 4 deletions

View File

@ -29,7 +29,7 @@
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<scope>provided</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -1,5 +1,7 @@
package de.muehlencord.shared.configuration; package de.muehlencord.shared.configuration;
import java.util.Map;
/** /**
* *
* @param <T> the type of the parameter * @param <T> the type of the parameter
@ -78,4 +80,11 @@ public interface Configuration<T, V extends T> {
* @throws ConfigurationException if the configuration is invalid * @throws ConfigurationException if the configuration is invalid
*/ */
public void validateConfiguration() throws ConfigurationException; public void validateConfiguration() throws ConfigurationException;
/**
* returns the map of parameters and values
*
* @return the map of parameters and values
*/
public Map<Parameter<T>, V> getParameterMap();
} }

View File

@ -16,9 +16,9 @@ public class DefaultConfiguration<T, V extends T> implements Configuration<T, V>
/** /**
* the parameter map * the parameter map
*/ */
private Map<Parameter<T>, V> parameterMap; private final Map<Parameter<T>, V> parameterMap;
/** mapping from name to parameter */ /** mapping from name to parameter */
private Map<String, Parameter<T>> parameterNameMap; private final Map<String, Parameter<T>> parameterNameMap;
/** /**
* creates a new instance of a configuration * creates a new instance of a configuration
@ -33,7 +33,7 @@ public class DefaultConfiguration<T, V extends T> implements Configuration<T, V>
* *
* @return the map of parameters and values * @return the map of parameters and values
*/ */
protected Map<Parameter<T>, V> getParameterMap() { public Map<Parameter<T>, V> getParameterMap() {
return parameterMap; return parameterMap;
} }