summaryrefslogtreecommitdiffstats
path: root/tools/tools-common/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-06-19 17:04:51 +0100
committerliamfallon <liam.fallon@est.tech>2020-06-19 17:05:05 +0100
commit9c0c0c8f61a08aec5c95ebb90647a0aae445e129 (patch)
tree4224dadcc265e2980a6f097976a3beb34ce14e93 /tools/tools-common/src
parent73470fb02d3d8a2fb37e80d9fb23a75955da32b5 (diff)
Changes for checkstyle 8.32
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'tools/tools-common/src')
-rw-r--r--tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java1
-rw-r--r--tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/Console.java1
-rw-r--r--tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java2
-rw-r--r--tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java20
-rw-r--r--tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java2
5 files changed, 11 insertions, 15 deletions
diff --git a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java
index dfaafbd25..67ef7d7dd 100644
--- a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java
+++ b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java
@@ -28,7 +28,6 @@ package org.onap.policy.apex.tools.common;
////
import java.util.Scanner;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
diff --git a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/Console.java b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/Console.java
index 1b4ef06c4..5c79fa4bc 100644
--- a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/Console.java
+++ b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/Console.java
@@ -23,7 +23,6 @@ package org.onap.policy.apex.tools.common;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
-
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.StrBuilder;
import org.slf4j.ext.XLoggerFactory;
diff --git a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java
index 5b386861a..0aa85df5d 100644
--- a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java
+++ b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java
@@ -30,8 +30,6 @@ import java.io.OutputStream;
import java.io.Writer;
import java.nio.file.FileSystems;
import java.nio.file.Path;
-
-import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java
index 36c64e517..abc01b5e3 100644
--- a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java
+++ b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/OutputFileTest.java
@@ -17,14 +17,16 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.tools.common;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import java.io.File;
import java.nio.file.FileSystems;
import java.nio.file.Path;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -36,15 +38,15 @@ public class OutputFileTest {
File file = fp.toFile();
@Before
- public void setUp() {
- if (file.exists()){
+ public void beforeSetUp() {
+ if (file.exists()) {
file.delete();
}
}
@Test
public void testToWriter() {
- OutputFile testFile = new OutputFile(testFileName,false);
+ OutputFile testFile = new OutputFile(testFileName, false);
testFile.validate();
file.setReadable(false);
file.setWritable(false);
@@ -55,19 +57,19 @@ public class OutputFileTest {
@Test
public void testValidate() {
- OutputFile testFile = new OutputFile(testFileName,true);
+ OutputFile testFile = new OutputFile(testFileName, true);
assertNull(testFile.validate());
file.setReadable(false);
file.setWritable(false);
assertNotNull(testFile.validate());
OutputFile testFile2 = new OutputFile(testFileName);
assertNotNull(testFile2.validate());
- assertEquals("file already exists",testFile2.validate());
+ assertEquals("file already exists", testFile2.validate());
}
@Test
public void testToOutputStream() {
- OutputFile testFile = new OutputFile(testFileName,true);
+ OutputFile testFile = new OutputFile(testFileName, true);
assertNotNull(testFile.toOutputStream());
file.setReadable(false);
file.setWritable(false);
@@ -76,7 +78,7 @@ public class OutputFileTest {
@After
public void testDown() {
- if (file.exists()){
+ if (file.exists()) {
file.delete();
}
}
diff --git a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java
index 723ad8739..797c7c1e8 100644
--- a/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java
+++ b/tools/tools-common/src/test/java/org/onap/policy/apex/tools/common/docs/ExampleCliParserTest.java
@@ -32,12 +32,10 @@ package org.onap.policy.apex.tools.common.docs;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.HelpFormatter;
import org.junit.Test;
-
//tag::import[]
import org.onap.policy.apex.tools.common.CliOptions;
import org.onap.policy.apex.tools.common.CliParser;
//end::import[]
-
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;