aboutsummaryrefslogtreecommitdiffstats
path: root/auth/cli-editor
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 /auth/cli-editor
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 'auth/cli-editor')
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java1
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineCommand.java1
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorLoop.java11
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineParameters.java2
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java1
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java2
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java25
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java1
12 files changed, 20 insertions, 28 deletions
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java
index 67d247e8d..6814eab8c 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java
@@ -25,7 +25,6 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Properties;
import java.util.SortedMap;
-
import org.onap.policy.apex.model.modelapi.ApexApiResult;
import org.onap.policy.apex.model.modelapi.ApexApiResult.Result;
import org.onap.policy.apex.model.modelapi.ApexModel;
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineCommand.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineCommand.java
index 38ff98010..beae65a06 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineCommand.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineCommand.java
@@ -23,7 +23,6 @@ package org.onap.policy.apex.auth.clieditor;
import java.util.ArrayList;
import java.util.List;
-
import org.onap.policy.common.utils.validation.Assertions;
/**
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorLoop.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorLoop.java
index d882b1a21..cfe2077bc 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorLoop.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorLoop.java
@@ -39,7 +39,6 @@ import java.util.List;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.TreeMap;
-
import org.apache.commons.lang3.tuple.MutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.onap.policy.apex.model.modelapi.ApexApiResult;
@@ -208,9 +207,8 @@ public class CommandLineEditorLoop {
executionStatus.setRight(executionStatus.getRight() + 1);
}
}
- }
- // Print any error messages from command parsing and finding
- catch (final CommandLineException e) {
+ } catch (final CommandLineException e) {
+ // Print any error messages from command parsing and finding
writer.println(e.getMessage());
executionStatus.setRight(executionStatus.getRight() + 1);
LOGGER.debug(COMMAND_LINE_ERROR, e);
@@ -254,9 +252,8 @@ public class CommandLineEditorLoop {
} else {
logicBlock.append(logicLine + "\n");
}
- }
- // Print any error messages from command parsing and finding
- catch (final CommandLineException e) {
+ } catch (final CommandLineException e) {
+ // Print any error messages from command parsing and finding
writer.println(e.getMessage());
executionStatus.setRight(executionStatus.getRight() + 1);
LOGGER.debug(COMMAND_LINE_ERROR, e);
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineParameters.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineParameters.java
index 27af9538c..9f0672bf1 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineParameters.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CommandLineParameters.java
@@ -28,10 +28,8 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-
import lombok.Getter;
import lombok.Setter;
-
import org.onap.policy.apex.auth.clieditor.utils.CliUtils;
import org.onap.policy.common.utils.resources.ResourceUtils;
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java
index 4fe67b357..a2b15f50e 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java
@@ -27,7 +27,6 @@ import java.util.NavigableMap;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
-
import org.onap.policy.common.utils.validation.Assertions;
/**
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
index 8d4fd8b86..f5d6d31fd 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
@@ -65,7 +65,7 @@ public class ApexCliToscaEditorMain {
String policyModelFilePath = null;
try {
- final File tempModelFile = File.createTempFile("policyModel",".json");
+ final File tempModelFile = File.createTempFile("policyModel", ".json");
policyModelFilePath = tempModelFile.getAbsolutePath();
} catch (IOException e) {
LOGGER.error("Cannot create the policy model temp file.", e);
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java
index 020e272dd..5c541e14a 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java
@@ -17,12 +17,15 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.auth.clieditor;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
import java.util.List;
-
import org.junit.Before;
import org.junit.Test;
@@ -43,7 +46,9 @@ public class CommandLineCommandTest {
assertTrue(commandLineCommand.isSystemCommand());
assertEquals("testDescription", commandLineCommand.getDescription());
assertEquals("TestName", commandLineCommand.getName());
- assertEquals("CLICommand [name=TestName,keywordlist=[], argumentList=[], apiMethod=, systemCommand=true, description=testDescription]",commandLineCommand.toString());
+ assertEquals(
+ "CLICommand [name=TestName,keywordlist=[], argumentList=[], apiMethod=, systemCommand=true,"
+ + " description=testDescription]", commandLineCommand.toString());
}
@Test(expected = CommandLineException.class)
@@ -72,27 +77,26 @@ public class CommandLineCommandTest {
@Test
public void testValidApiMethodName() {
commandLineCommand.setApiMethod("Java.Get");
- assertEquals("Get",commandLineCommand.getApiMethodName());
+ assertEquals("Get", commandLineCommand.getApiMethodName());
}
@Test
public void testGetHelp() {
List<String> keywordList = commandLineCommand.getKeywordlist();
List<CommandLineArgument> argumentList = commandLineCommand.getArgumentList();
- assertEquals("{}: ",commandLineCommand.getHelp());
+ assertEquals("{}: ", commandLineCommand.getHelp());
keywordList.add("TestKeyword");
argumentList.add(new CommandLineArgument("TestArgument"));
argumentList.add(null);
- assertEquals("TestKeyword {}: \n" +
- " TestArgument: (M) ",commandLineCommand.getHelp());
+ assertEquals("TestKeyword {}: \n" + "\tTestArgument: (M) ", commandLineCommand.getHelp());
}
@Test
public void testCompareTo() {
- assertEquals(0,commandLineCommand.compareTo(commandLineCommand));
+ assertEquals(0, commandLineCommand.compareTo(commandLineCommand));
CommandLineCommand otherCommand = new CommandLineCommand();
otherCommand.setSystemCommand(true);
- assertEquals(6,commandLineCommand.compareTo(otherCommand));
+ assertEquals(6, commandLineCommand.compareTo(otherCommand));
otherCommand.getArgumentList().add(new CommandLineArgument("testArgument"));
assertEquals(-609496833, commandLineCommand.compareTo(otherCommand));
}
@@ -123,10 +127,11 @@ public class CommandLineCommandTest {
@Test
public void testEquals() {
- CommandLineCommand otherCommand = new CommandLineCommand();
assertFalse(commandLineCommand.equals(new Object()));
assertTrue(commandLineCommand.equals(commandLineCommand));
assertFalse(commandLineCommand.equals(null));
+
+ CommandLineCommand otherCommand = new CommandLineCommand();
assertTrue(commandLineCommand.equals(otherCommand));
otherCommand.getKeywordlist().add("TestKeyword");
assertFalse(commandLineCommand.equals(otherCommand));
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java
index 8cbc1698f..d00a9232b 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java
@@ -27,7 +27,6 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
-
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java
index a5362a8f1..509a57cf8 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java
@@ -29,7 +29,6 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
import org.onap.policy.common.utils.resources.TextFileUtils;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java
index 21f1e1969..f82453b95 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java
@@ -27,7 +27,6 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.net.URL;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
index f458a9fb9..44bdc798a 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
@@ -28,7 +28,6 @@ import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Paths;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
index 8f6f193c1..caaa12925 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
@@ -25,7 +25,6 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.net.URL;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;