summaryrefslogtreecommitdiffstats
path: root/auth/cli-codegen
diff options
context:
space:
mode:
authorDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-14 12:32:51 +0100
committerDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-14 14:53:51 +0100
commit3ab54a2340f40d11d9a0a3994f579baeeb6c0ca6 (patch)
treef7438c01cc0023c47b2d15c2eb84254c626ef73b /auth/cli-codegen
parent933af17963b47650fe9864d03e63a06aa08e31a9 (diff)
Fix checkstyle warnings in the auth package
Change-Id: I64f783d5325301862e2438ac5d22cfcc0a150579 Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com> Issue-ID: POLICY-1034
Diffstat (limited to 'auth/cli-codegen')
-rw-r--r--auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CgStringRenderer.java14
-rw-r--r--auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java26
2 files changed, 20 insertions, 20 deletions
diff --git a/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CgStringRenderer.java b/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CgStringRenderer.java
index 50600f99f..dbf8f3844 100644
--- a/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CgStringRenderer.java
+++ b/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CgStringRenderer.java
@@ -35,17 +35,17 @@ public class CgStringRenderer implements AttributeRenderer {
/*
* (non-Javadoc)
- *
+ *
* @see org.stringtemplate.v4.AttributeRenderer#toString(java.lang.Object, java.lang.String,
* java.util.Locale)
*/
@Override
- public String toString(final Object o, final String format, final Locale locale) {
+ public String toString(final Object obj, final String format, final Locale locale) {
if ("doQuotes".equals(format)) {
- if (o == null) {
+ if (obj == null) {
return null;
}
- String ret = o.toString();
+ String ret = obj.toString();
if (ret.length() == 0) {
return "\"\"";
}
@@ -56,16 +56,16 @@ public class CgStringRenderer implements AttributeRenderer {
}
if ("doDescription".equals(format)) {
- String ret = o.toString();
+ String ret = obj.toString();
if (ret.contains("\n") || ret.contains("\"")) {
ret = "LS" + "\n" + ret + "\n" + "LE";
} else {
- ret = this.toString(o, "doQuotes", locale);
+ ret = this.toString(obj, "doQuotes", locale);
}
return ret;
}
// return the default string renderer if we don't know otherwise
- return new StringRenderer().toString(o, format, locale);
+ return new StringRenderer().toString(obj, format, locale);
}
}
diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java
index ed703da82..28e32bca6 100644
--- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java
+++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java
@@ -39,8 +39,8 @@ public class StErrorListener implements STErrorListener {
@Override
public void IOError(final STMessage msg) {
switch (msg.error) {
- default:
- this.registerErrors(msg);
+ default:
+ this.registerErrors(msg);
}
}
@@ -50,8 +50,8 @@ public class StErrorListener implements STErrorListener {
@Override
public void compileTimeError(final STMessage msg) {
switch (msg.error) {
- default:
- this.registerErrors(msg);
+ default:
+ this.registerErrors(msg);
}
}
@@ -61,8 +61,8 @@ public class StErrorListener implements STErrorListener {
@Override
public void internalError(final STMessage msg) {
switch (msg.error) {
- default:
- this.registerErrors(msg);
+ default:
+ this.registerErrors(msg);
}
}
@@ -72,18 +72,18 @@ public class StErrorListener implements STErrorListener {
@Override
public void runTimeError(final STMessage msg) {
switch (msg.error) {
- case NO_SUCH_PROPERTY:
- case ARGUMENT_COUNT_MISMATCH:
- case ANON_ARGUMENT_MISMATCH:
- break;
- default:
- this.registerErrors(msg);
+ case NO_SUCH_PROPERTY:
+ case ARGUMENT_COUNT_MISMATCH:
+ case ANON_ARGUMENT_MISMATCH:
+ break;
+ default:
+ this.registerErrors(msg);
}
}
/**
* Registers an error with the local error listener and increases the error count.
- *
+ *
* @param msg error message
*/
protected void registerErrors(final STMessage msg) {