aboutsummaryrefslogtreecommitdiffstats
path: root/model/utilities
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-04 17:24:15 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-04 17:25:22 +0100
commit87be30582d1db37bee7c6b456c0c5c3ca9584963 (patch)
tree28806c5866fc5d07c89a06014d7c7d2705772b4f /model/utilities
parentf32508381ce0b555fc14978cbaa458aa4e2d91c5 (diff)
Fix checkstyle issues in apex model basic
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'model/utilities')
-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";