summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-08-13 14:39:43 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-08-13 14:39:50 -0400
commit2d381afcd78b61d8791ace22b676e88271b3bdce (patch)
treebfddd966d78d1683ca01124d00b1799389ade500 /utils
parent269e543ba89dbf553fc66227f7123a302f56b5b4 (diff)
Fix checkstyle in utils
Cleared all the checkstyle in these 2 submodules. Issue-ID: POLICY-881 Change-Id: I248e1894aebf549d5a4f8669a6466ec227d40b55 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java8
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/properties/PropertyConfiguration.java40
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/properties/SpecProperties.java2
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAccessException.java4
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationException.java4
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyException.java9
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidException.java4
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyMissingException.java1
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/time/CurrentTime.java7
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/PropertyConfigurationTest.java89
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/SpecPropertiesTest.java4
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/exception/BasicPropertyExceptionTester.java1
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAccessExceptionTest.java18
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationExceptionTest.java14
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyExceptionTest.java14
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidExceptionTest.java14
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyMissingExceptionTest.java5
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/time/CurrentTimeTest.java1
18 files changed, 149 insertions, 90 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java b/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java
index c9afa19e..ae70ba44 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java
@@ -30,14 +30,14 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Network Utilities
+ * Network Utilities.
*/
public class NetworkUtil {
public static final Logger logger = LoggerFactory.getLogger(NetworkUtil.class.getName());
/**
- * IPv4 Wildcard IP address
+ * IPv4 Wildcard IP address.
*/
public static final String IPv4_WILDCARD_ADDRESS = "0.0.0.0";
@@ -73,7 +73,7 @@ public class NetworkUtil {
}
/**
- * gets host name
+ * Gets host name.
*
* @return host name
*/
@@ -95,7 +95,7 @@ public class NetworkUtil {
}
/**
- * gets host's IP
+ * Gets host's IP.
*
* @return host IP
*/
diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/PropertyConfiguration.java b/utils/src/main/java/org/onap/policy/common/utils/properties/PropertyConfiguration.java
index e72ebaba..653fe484 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/properties/PropertyConfiguration.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/properties/PropertyConfiguration.java
@@ -41,8 +41,8 @@ import org.onap.policy.common.utils.properties.exception.PropertyMissingExceptio
* subclass. The values of the fields are set via <i>setXxx()</i> methods. As a result, if
* a field is annotated and there is no corresponding <i>setXxx()</i> method, then an
* exception will be thrown.
- * <p>
- * It is possible that an invalid <i>defaultValue</i> is specified via the
+ *
+ * <p>It is possible that an invalid <i>defaultValue</i> is specified via the
* {@link Property} annotation. This could remain undetected until an optional property is
* left out of the {@link Properties}. Consequently, this class will always validate a
* {@link Property}'s default value, if the <i>defaultValue</i> is not empty or if
@@ -120,23 +120,6 @@ public class PropertyConfiguration {
}
/**
- * @param field field whose value is to be set
- * @param prop property of interest
- * @return the method to be used to set the field's value
- * @throws PropertyAccessException if a "set" method cannot be identified
- */
- private Method getSetter(Field field, Property prop) throws PropertyAccessException {
- String nm = "set" + StringUtils.capitalize(field.getName());
-
- try {
- return this.getClass().getMethod(nm, field.getType());
-
- } catch (NoSuchMethodException | SecurityException e) {
- throw new PropertyAccessException(prop.name(), nm, e);
- }
- }
-
- /**
* Sets a field's value from a particular property.
*
* @param setter method to be used to set the field's value
@@ -167,6 +150,25 @@ public class PropertyConfiguration {
}
/**
+ * Get the setter.
+ *
+ * @param field field whose value is to be set
+ * @param prop property of interest
+ * @return the method to be used to set the field's value
+ * @throws PropertyAccessException if a "set" method cannot be identified
+ */
+ private Method getSetter(Field field, Property prop) throws PropertyAccessException {
+ String nm = "set" + StringUtils.capitalize(field.getName());
+
+ try {
+ return this.getClass().getMethod(nm, field.getType());
+
+ } catch (NoSuchMethodException | SecurityException e) {
+ throw new PropertyAccessException(prop.name(), nm, e);
+ }
+ }
+
+ /**
* Gets a property value, coercing it to the field's type.
*
* @param field field whose value is to be set
diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/SpecProperties.java b/utils/src/main/java/org/onap/policy/common/utils/properties/SpecProperties.java
index 0f416c3a..17009a83 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/properties/SpecProperties.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/properties/SpecProperties.java
@@ -39,6 +39,7 @@ public class SpecProperties extends Properties {
private final String specPrefix;
/**
+ * Constructor.
*
* @param prefix the property name prefix that appears before any specialization, may
* be ""
@@ -50,6 +51,7 @@ public class SpecProperties extends Properties {
}
/**
+ * Constructor.
*
* @param prefix the property name prefix that appears before any specialization, may
* be ""
diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAccessException.java b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAccessException.java
index 568a8a79..b416cd0f 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAccessException.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAccessException.java
@@ -28,6 +28,7 @@ public class PropertyAccessException extends PropertyException {
private static final long serialVersionUID = 1L;
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -37,6 +38,7 @@ public class PropertyAccessException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -47,6 +49,7 @@ public class PropertyAccessException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -57,6 +60,7 @@ public class PropertyAccessException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationException.java b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationException.java
index 2803ddfe..f068e158 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationException.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationException.java
@@ -27,6 +27,7 @@ public class PropertyAnnotationException extends PropertyException {
private static final long serialVersionUID = 1L;
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -36,6 +37,7 @@ public class PropertyAnnotationException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -46,6 +48,7 @@ public class PropertyAnnotationException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -56,6 +59,7 @@ public class PropertyAnnotationException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyException.java b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyException.java
index 8df4fb8e..44edd428 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyException.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyException.java
@@ -37,6 +37,7 @@ public class PropertyException extends Exception {
private final String fieldName;
/**
+ * Constructor.
*
* @param propName name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -49,6 +50,7 @@ public class PropertyException extends Exception {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -62,6 +64,7 @@ public class PropertyException extends Exception {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -75,6 +78,7 @@ public class PropertyException extends Exception {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -89,6 +93,7 @@ public class PropertyException extends Exception {
}
/**
+ * Get the property name.
*
* @return name of the property for which the exception was thrown, or {@code null} if
* no name was provided
@@ -98,6 +103,7 @@ public class PropertyException extends Exception {
}
/**
+ * Get the field name.
*
* @return name of the field for which the exception was thrown, or {@code null} if no
* field was provided
@@ -107,6 +113,8 @@ public class PropertyException extends Exception {
}
/**
+ * Make the message.
+ *
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
* @param message error message, never {@code null}
@@ -117,6 +125,7 @@ public class PropertyException extends Exception {
}
/**
+ * Make the message.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidException.java b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidException.java
index da1b6ae8..aad44318 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidException.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidException.java
@@ -28,6 +28,7 @@ public class PropertyInvalidException extends PropertyException {
private static final long serialVersionUID = 1L;
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -37,6 +38,7 @@ public class PropertyInvalidException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -47,6 +49,7 @@ public class PropertyInvalidException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
@@ -57,6 +60,7 @@ public class PropertyInvalidException extends PropertyException {
}
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyMissingException.java b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyMissingException.java
index de542e6a..ccbe5f9a 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyMissingException.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/properties/exception/PropertyMissingException.java
@@ -27,6 +27,7 @@ public class PropertyMissingException extends PropertyException {
private static final long serialVersionUID = 1L;
/**
+ * Constructor.
*
* @param propnm name of the property causing the exception, or {@code null}
* @param fieldName name of the field causing the exception, or {@code null}
diff --git a/utils/src/main/java/org/onap/policy/common/utils/time/CurrentTime.java b/utils/src/main/java/org/onap/policy/common/utils/time/CurrentTime.java
index cab469e5..857b69b6 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/time/CurrentTime.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/time/CurrentTime.java
@@ -29,6 +29,7 @@ import java.util.Date;
public class CurrentTime {
/**
+ * Constructor.
*
*/
public CurrentTime() {
@@ -36,6 +37,8 @@ public class CurrentTime {
}
/**
+ * Get the millisecond time.
+ *
* @return the current time, in milliseconds
*/
public long getMillis() {
@@ -43,6 +46,8 @@ public class CurrentTime {
}
/**
+ * Get the current date.
+ *
* @return the current Date
*/
public Date getDate() {
@@ -53,7 +58,7 @@ public class CurrentTime {
* Sleeps for a period of time.
*
* @param sleepMs amount of time to sleep, in milliseconds
- * @throws InterruptedException
+ * @throws InterruptedException can be interrupted
*/
public void sleep(long sleepMs) throws InterruptedException {
Thread.sleep(sleepMs);
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/PropertyConfigurationTest.java b/utils/src/test/java/org/onap/policy/common/utils/properties/PropertyConfigurationTest.java
index 121ae384..dbe04aee 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/PropertyConfigurationTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/PropertyConfigurationTest.java
@@ -22,6 +22,7 @@ package org.onap.policy.common.utils.properties;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+
import java.lang.reflect.Field;
import java.util.Properties;
import org.junit.Before;
@@ -32,7 +33,7 @@ import org.onap.policy.common.utils.properties.exception.PropertyInvalidExceptio
import org.onap.policy.common.utils.properties.exception.PropertyMissingException;
/**
- *
+ * Test class for PropertyConfiguration.
*/
public class PropertyConfigurationTest {
@@ -100,7 +101,7 @@ public class PropertyConfigurationTest {
public void setGrandparentValue(boolean grandparentValue) {
this.grandparentValue = grandparentValue;
}
- };
+ }
/*
* Implements the extra interface, too.
@@ -114,7 +115,7 @@ public class PropertyConfigurationTest {
public void setParentValue(long parentValue) {
this.parentValue = parentValue;
}
- };
+ }
class Config extends ParentConfig {
@@ -125,10 +126,10 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
- Config cfg = new Config();
+ final Config cfg = new Config();
// try one set of values
props.setProperty(THE_VALUE, STRING_VALUE);
@@ -162,7 +163,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
Config cfg = new Config();
@@ -195,7 +196,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, STRING_VALUE);
Config cfg = new Config(props);
@@ -219,7 +220,7 @@ public class PropertyConfigurationTest {
public void setValue(Exception value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, STRING_VALUE);
new Config(props);
@@ -235,7 +236,7 @@ public class PropertyConfigurationTest {
public Config(Properties props) throws PropertyException {
super(props);
}
- };
+ }
props.setProperty(THE_VALUE, STRING_VALUE);
new Config(props);
@@ -262,7 +263,7 @@ public class PropertyConfigurationTest {
protected Object getValue(Field field, Properties props, Property prop) throws PropertyException {
return Boolean.TRUE;
}
- };
+ }
new Config(props);
}
@@ -279,7 +280,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
throw new IllegalArgumentException("expected exception");
}
- };
+ }
props.setProperty(THE_VALUE, STRING_VALUE);
new Config(props);
@@ -410,7 +411,7 @@ public class PropertyConfigurationTest {
public void setPrimLongValue(long primLongValue) {
this.primLongValue = primLongValue;
}
- };
+ }
props.setProperty("string", "a string");
props.setProperty("boolean.true", "true");
@@ -451,7 +452,7 @@ public class PropertyConfigurationTest {
public void setValue(Exception value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, STRING_VALUE);
new Config(props);
@@ -489,7 +490,7 @@ public class PropertyConfigurationTest {
public void setProtectedString(String protectedString) {
this.protectedString = protectedString;
}
- };
+ }
props.setProperty("public", "a public string");
props.setProperty("private", "a private string");
@@ -519,7 +520,7 @@ public class PropertyConfigurationTest {
public Config(Properties props) throws PropertyException {
super(props);
}
- };
+ }
props.setProperty(THE_VALUE, STRING_VALUE);
new Config(props);
@@ -562,7 +563,7 @@ public class PropertyConfigurationTest {
public void setValue(Boolean value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, "true");
new Config(props);
@@ -583,7 +584,7 @@ public class PropertyConfigurationTest {
public void setValue(Boolean value) {
this.value = value;
}
- };
+ }
// property not defined
Config cfg = new Config(props);
@@ -615,7 +616,7 @@ public class PropertyConfigurationTest {
public void setValue(Boolean value) {
this.value = value;
}
- };
+ }
// property not defined
Config cfg = new Config(props);
@@ -647,7 +648,7 @@ public class PropertyConfigurationTest {
public void setValue(Integer value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, "200");
Config cfg = new Config(props);
@@ -670,7 +671,7 @@ public class PropertyConfigurationTest {
public void setValue(Integer value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, "200");
new Config(props);
@@ -691,7 +692,7 @@ public class PropertyConfigurationTest {
public void setValue(Integer value) {
this.value = value;
}
- };
+ }
// property not defined
Config cfg = new Config(props);
@@ -718,7 +719,7 @@ public class PropertyConfigurationTest {
public void setValue(Long value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, "20000");
Config cfg = new Config(props);
@@ -741,7 +742,7 @@ public class PropertyConfigurationTest {
public void setValue(Long value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, "20000");
new Config(props);
@@ -762,7 +763,7 @@ public class PropertyConfigurationTest {
public void setValue(Long value) {
this.value = value;
}
- };
+ }
// property not defined
Config cfg = new Config(props);
@@ -797,7 +798,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, STRING_VALUE);
Config cfg = new Config(props);
@@ -820,7 +821,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
props.setProperty(THE_VALUE, "");
Config cfg = new Config(props);
@@ -843,7 +844,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
Config cfg = new Config(props);
@@ -865,7 +866,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
Config cfg = new Config(props);
@@ -887,7 +888,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
new Config(props);
}
@@ -907,7 +908,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
Config cfg = new Config(props);
@@ -926,7 +927,7 @@ public class PropertyConfigurationTest {
protected String getRawPropertyValue(Properties props, String propnm) {
return STRING_VALUE;
}
- };
+ }
Config cfg = new Config(props);
@@ -1005,7 +1006,7 @@ public class PropertyConfigurationTest {
public void setValue(long value) {
this.value = value;
}
- };
+ }
Config cfg = new Config(props);
@@ -1027,7 +1028,7 @@ public class PropertyConfigurationTest {
public void setValue(long value) {
this.value = value;
}
- };
+ }
new Config(props);
}
@@ -1047,7 +1048,7 @@ public class PropertyConfigurationTest {
public void setValue(long value) {
this.value = value;
}
- };
+ }
new Config(props);
}
@@ -1067,7 +1068,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
// missing property - should default to ""
Config cfg = new Config(props);
@@ -1099,7 +1100,7 @@ public class PropertyConfigurationTest {
public void setValue(long value) {
this.value = value;
}
- };
+ }
new Config(props);
}
@@ -1119,7 +1120,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
Config cfg = new Config(props);
@@ -1141,7 +1142,7 @@ public class PropertyConfigurationTest {
public void setValue(long value) {
this.value = value;
}
- };
+ }
new Config(props);
}
@@ -1169,7 +1170,7 @@ public class PropertyConfigurationTest {
public void setValue(String value) {
this.value = value;
}
- };
+ }
/**
* Config with a Boolean value having no qualifiers.
@@ -1186,7 +1187,7 @@ public class PropertyConfigurationTest {
public void setValue(Boolean value) {
this.value = value;
}
- };
+ }
/**
* Config with an int value having no qualifiers.
@@ -1203,7 +1204,7 @@ public class PropertyConfigurationTest {
public void setValue(int value) {
this.value = value;
}
- };
+ }
/**
* Config with a long value having no qualifiers.
@@ -1220,7 +1221,7 @@ public class PropertyConfigurationTest {
public void setValue(long value) {
this.value = value;
}
- };
+ }
/**
* A config whose field is "static".
@@ -1238,7 +1239,7 @@ public class PropertyConfigurationTest {
public static void setValue(String value) {
StaticPropConfig.value = value;
}
- };
+ }
/**
* A config whose method is "static".
@@ -1256,7 +1257,7 @@ public class PropertyConfigurationTest {
public static void setValue(String value) {
}
- };
+ }
/**
* This is just used as a mix-in to ensure that the configuration ignores interfaces.
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/SpecPropertiesTest.java b/utils/src/test/java/org/onap/policy/common/utils/properties/SpecPropertiesTest.java
index 01f096d1..0e4216c6 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/SpecPropertiesTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/SpecPropertiesTest.java
@@ -22,6 +22,7 @@ package org.onap.policy.common.utils.properties;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+
import java.util.Properties;
import org.junit.Before;
import org.junit.Test;
@@ -78,6 +79,9 @@ public class SpecPropertiesTest {
private Properties supportingProps;
private SpecProperties props;
+ /**
+ * Set up the tests.
+ */
@Before
public void setUp() {
supportingProps = new Properties();
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/BasicPropertyExceptionTester.java b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/BasicPropertyExceptionTester.java
index 1e5fcfcd..c972e648 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/BasicPropertyExceptionTester.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/BasicPropertyExceptionTester.java
@@ -23,6 +23,7 @@ package org.onap.policy.common.utils.properties.exception;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
+
import org.hamcrest.CoreMatchers;
/**
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAccessExceptionTest.java b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAccessExceptionTest.java
index 304df9df..57581d9e 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAccessExceptionTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAccessExceptionTest.java
@@ -23,12 +23,14 @@ package org.onap.policy.common.utils.properties.exception;
import org.junit.Test;
/**
- *
+ * Test class for PropertyAccessException.
*/
public class PropertyAccessExceptionTest extends BasicPropertyExceptionTester {
/**
- * Test method for {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException(java.lang.String, java.lang.String)}.
+ * Test method for
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException
+ * (java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyAccessExceptionStringField() {
@@ -39,7 +41,9 @@ public class PropertyAccessExceptionTest extends BasicPropertyExceptionTester {
}
/**
- * Test method for {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException(java.lang.String, java.lang.String, java.lang.String)}.
+ * Test method for
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException
+ * (java.lang.String, java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyAccessExceptionStringFieldString() {
@@ -47,7 +51,9 @@ public class PropertyAccessExceptionTest extends BasicPropertyExceptionTester {
}
/**
- * Test method for {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException(java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * Test method for
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException
+ * (java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyAccessExceptionStringFieldThrowable() {
@@ -55,7 +61,9 @@ public class PropertyAccessExceptionTest extends BasicPropertyExceptionTester {
}
/**
- * Test method for {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException(java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * Test method for
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyAccessException#PropertyAccessException
+ * (java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyAccessExceptionStringFieldStringThrowable() {
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationExceptionTest.java b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationExceptionTest.java
index 2c033084..934ca026 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationExceptionTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyAnnotationExceptionTest.java
@@ -23,13 +23,14 @@ package org.onap.policy.common.utils.properties.exception;
import org.junit.Test;
/**
- *
+ * Test class for PropertyAnnotationException.
*/
public class PropertyAnnotationExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyExceptionStringField() {
@@ -41,7 +42,8 @@ public class PropertyAnnotationExceptionTest extends BasicPropertyExceptionTeste
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.String)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyExceptionStringFieldString() {
@@ -50,7 +52,8 @@ public class PropertyAnnotationExceptionTest extends BasicPropertyExceptionTeste
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyExceptionStringFieldThrowable() {
@@ -59,7 +62,8 @@ public class PropertyAnnotationExceptionTest extends BasicPropertyExceptionTeste
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyExceptionStringFieldStringThrowable() {
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyExceptionTest.java b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyExceptionTest.java
index 18186ba2..a0d4645f 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyExceptionTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyExceptionTest.java
@@ -23,13 +23,14 @@ package org.onap.policy.common.utils.properties.exception;
import org.junit.Test;
/**
- *
+ * Test class for PropertyException.
*/
public class PropertyExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyExceptionStringField() {
@@ -41,7 +42,8 @@ public class PropertyExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.String)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyExceptionStringFieldString() {
@@ -50,7 +52,8 @@ public class PropertyExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyExceptionStringFieldThrowable() {
@@ -59,7 +62,8 @@ public class PropertyExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyExceptionStringFieldStringThrowable() {
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidExceptionTest.java b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidExceptionTest.java
index f83b7ed3..ce7be108 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidExceptionTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyInvalidExceptionTest.java
@@ -23,13 +23,14 @@ package org.onap.policy.common.utils.properties.exception;
import org.junit.Test;
/**
- *
+ * Test class for PropertyInvalidException.
*/
public class PropertyInvalidExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyExceptionStringField() {
@@ -41,7 +42,8 @@ public class PropertyInvalidExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.String)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyExceptionStringFieldString() {
@@ -50,7 +52,8 @@ public class PropertyInvalidExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyExceptionStringFieldThrowable() {
@@ -59,7 +62,8 @@ public class PropertyInvalidExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)}.
*/
@Test
public void testPropertyExceptionStringFieldStringThrowable() {
diff --git a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyMissingExceptionTest.java b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyMissingExceptionTest.java
index f99ddd93..320a0c23 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyMissingExceptionTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/properties/exception/PropertyMissingExceptionTest.java
@@ -23,13 +23,14 @@ package org.onap.policy.common.utils.properties.exception;
import org.junit.Test;
/**
- *
+ * Test class for PropertyMissingException.
*/
public class PropertyMissingExceptionTest extends BasicPropertyExceptionTester {
/**
* Test method for
- * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException(java.lang.String, java.lang.String)}.
+ * {@link org.onap.policy.common.utils.properties.exception.PropertyException#PropertyException
+ * (java.lang.String, java.lang.String)}.
*/
@Test
public void testPropertyExceptionStringField() {
diff --git a/utils/src/test/java/org/onap/policy/common/utils/time/CurrentTimeTest.java b/utils/src/test/java/org/onap/policy/common/utils/time/CurrentTimeTest.java
index 694a3d21..499372ab 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/time/CurrentTimeTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/time/CurrentTimeTest.java
@@ -21,6 +21,7 @@
package org.onap.policy.common.utils.time;
import static org.junit.Assert.assertTrue;
+
import org.junit.Test;
public class CurrentTimeTest {