summaryrefslogtreecommitdiffstats
path: root/model/utilities/src
diff options
context:
space:
mode:
Diffstat (limited to 'model/utilities/src')
-rw-r--r--model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java3
-rw-r--r--model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java18
-rw-r--r--model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java3
-rw-r--r--model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JsonHandlerTest.java (renamed from model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JSONHandlerTest.java)7
4 files changed, 14 insertions, 17 deletions
diff --git a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java
index 97face9bd..29e31d6e6 100644
--- a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java
+++ b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java
@@ -103,7 +103,8 @@ public abstract class TextFileUtils {
if (charsRead > 0) {
builder.append(chars, 0, charsRead);
}
- } while (charsRead > 0);
+ }
+ while (charsRead > 0);
return builder.toString();
}
}
diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java
index 4682d985d..e9ddc11bc 100644
--- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java
+++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java
@@ -28,24 +28,22 @@ import java.util.List;
import org.junit.Test;
import org.onap.policy.apex.model.utilities.CollectionUtils;
-/**
- * @author Liam Fallon (liam.fallon@ericsson.com)
- */
public class CollectionUtilitiesTest {
@Test
public void testNullLists() {
- List<String> leftList = new ArrayList<String>();
- List<String> rightList = new ArrayList<String>();
-
int result = 0;
result = CollectionUtils.compareLists(null, null);
assertEquals(0, result);
+ List<String> leftList = new ArrayList<String>();
+
result = CollectionUtils.compareLists(leftList, null);
assertEquals(-1, result);
+ List<String> rightList = new ArrayList<String>();
+
result = CollectionUtils.compareLists(null, rightList);
assertEquals(1, result);
@@ -73,8 +71,8 @@ public class CollectionUtilitiesTest {
result = CollectionUtils.compareLists(leftList, rightList);
assertEquals(-1, result);
- leftList.remove(leftList.size() -1);
- rightList.remove(rightList.size() -1);
+ leftList.remove(leftList.size() - 1);
+ rightList.remove(rightList.size() - 1);
result = CollectionUtils.compareLists(leftList, rightList);
assertEquals(0, result);
@@ -83,8 +81,8 @@ public class CollectionUtilitiesTest {
result = CollectionUtils.compareLists(leftList, rightList);
assertEquals(1, result);
- leftList.remove(leftList.size() -1);
- rightList.remove(rightList.size() -1);
+ leftList.remove(leftList.size() - 1);
+ rightList.remove(rightList.size() - 1);
result = CollectionUtils.compareLists(leftList, rightList);
assertEquals(0, result);
}
diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java
index 84e9733f3..95839cd72 100644
--- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java
+++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java
@@ -29,9 +29,6 @@ import org.junit.Test;
import org.onap.policy.apex.model.utilities.DirectoryUtils;
import org.onap.policy.apex.model.utilities.TextFileUtils;
-/**
- * @author Liam Fallon (liam.fallon@ericsson.com)
- */
public class DirectoryUtilsTest {
@Test
diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JSONHandlerTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JsonHandlerTest.java
index b8e2cebbc..c9db6c395 100644
--- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JSONHandlerTest.java
+++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JsonHandlerTest.java
@@ -17,10 +17,13 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.model.utilities.json;
import static org.junit.Assert.assertEquals;
+import com.google.gson.GsonBuilder;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -28,9 +31,7 @@ import java.nio.charset.StandardCharsets;
import org.junit.Test;
-import com.google.gson.GsonBuilder;
-
-public class JSONHandlerTest {
+public class JsonHandlerTest {
private static final String VALUE = "value";