fixed sonar findings
This commit is contained in:
@ -6,12 +6,7 @@ package de.muehlencord.shared.configuration;
|
||||
*/
|
||||
public class ConfigurationException extends Exception {
|
||||
|
||||
/**
|
||||
* Creates a new instance of
|
||||
* <code>ParameterException</code> without detail message.
|
||||
*/
|
||||
public ConfigurationException() {
|
||||
}
|
||||
private static final long serialVersionUID = 2714239259852576278L;
|
||||
|
||||
/**
|
||||
* Constructs an instance of
|
||||
|
||||
@ -6,12 +6,8 @@ package de.muehlencord.shared.configuration;
|
||||
*/
|
||||
public class ConverterException extends Exception {
|
||||
|
||||
/**
|
||||
* Creates a new instance of
|
||||
* <code>ConverterException</code> without detail message.
|
||||
*/
|
||||
public ConverterException() {
|
||||
}
|
||||
private static final long serialVersionUID = 3587621400600640847L;
|
||||
|
||||
|
||||
/**
|
||||
* Constructs an instance of
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package de.muehlencord.shared.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -121,7 +122,7 @@ public abstract class Parameter<T> {
|
||||
* @return the list of parameters the given parameter requires
|
||||
*/
|
||||
public List<Parameter<?>> getRequiredParameter() {
|
||||
return requiredParameters;
|
||||
return new ArrayList<>(requiredParameters);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -149,10 +150,9 @@ public abstract class Parameter<T> {
|
||||
if (o == null) {
|
||||
return false;
|
||||
}
|
||||
if (o instanceof Parameter) {
|
||||
if (o.getClass() == this.getClass()) {
|
||||
Parameter param = (Parameter) o;
|
||||
return param.getName().equals(getName());
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -6,13 +6,9 @@ package de.muehlencord.shared.configuration;
|
||||
*/
|
||||
public class ValidationException extends Exception {
|
||||
|
||||
/**
|
||||
* Creates a new instance of
|
||||
* <code>ValidationException</code> without detail message.
|
||||
*/
|
||||
public ValidationException() {
|
||||
}
|
||||
private static final long serialVersionUID = -5137890709720975939L;
|
||||
|
||||
|
||||
/**
|
||||
* Constructs an instance of
|
||||
* <code>ValidationException</code> with the specified detail message.
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
package de.muehlencord.shared.configuration;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user