summaryrefslogtreecommitdiffstats
path: root/auth/auth-cmd/src/main
diff options
context:
space:
mode:
authorJonathan Gathman <jonathan.gathman@att.com>2018-11-28 12:50:46 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-28 12:50:46 +0000
commit4c93571c67abd90c6da8b4ed0d5b93e1fe25887d (patch)
treea6a9723ef55b00ba483a7eb97df344014247422a /auth/auth-cmd/src/main
parent2ee44a528bf12720072575188eabd93ad4ee90fc (diff)
parent4f44dd6904551dd79d6e5a3e5ecc6747bb6aad2e (diff)
Merge "Sonar Fix: Cmd.java"
Diffstat (limited to 'auth/auth-cmd/src/main')
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java36
1 files changed, 19 insertions, 17 deletions
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java
index 3a0c869b..0597640f 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java
@@ -63,7 +63,7 @@ public abstract class Cmd {
protected static final int lineLength = 80;
- private final static String hformat = "%-23s %-5s %-20s %-35s\n";
+ private static final String hformat = "%-23s %-5s %-20s %-35s\n";
public static final String STARTDATE = "startdate";
public static final String ENDDATE = "enddate";
@@ -73,7 +73,7 @@ public abstract class Cmd {
private int required;
protected final Cmd parent;
protected final List<Cmd> children;
- private final static ConcurrentHashMap<Class<?>,RosettaDF<?>> dfs = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap<Class<?>,RosettaDF<?>> dfs = new ConcurrentHashMap<>();
public final AAFcli aafcli;
protected Access access;
private AuthzEnv env;
@@ -156,8 +156,12 @@ public abstract class Cmd {
protected void multiChar(StringBuilder sb, int length, char c, int indent) {
sb.append('\n');
- for (int i=0;i<indent;++i)sb.append(' ');
- for (int i=indent;i<length;++i)sb.append(c);
+ for (int i=0;i<indent;++i) {
+ sb.append(' ');
+ }
+ for (int i=indent;i<length;++i) {
+ sb.append(c);
+ }
}
public StringBuilder build(StringBuilder sb, StringBuilder detail) {
@@ -185,7 +189,7 @@ public abstract class Cmd {
multiChar(sb,indent,' ',0);
} else {
// Write parents for Detailed Report
- Stack<String> stack = new Stack<String>();
+ Stack<String> stack = new Stack<>();
for (Cmd c = child.parent;c!=null;c=c.parent) {
if (c.name!=null) {
stack.push(c.name);
@@ -341,11 +345,15 @@ public abstract class Cmd {
}
} else {
pw().println(header);
- for (int i=0;i<lineLength;++i)pw().print('-');
+ for (int i=0;i<lineLength;++i) {
+ pw().print('-');
+ }
pw().println();
pw().format(hformat,"Date","Table","User","Memo");
- for (int i=0;i<lineLength;++i)pw().print('-');
+ for (int i=0;i<lineLength;++i) {
+ pw().print('-');
+ }
pw().println();
// Save Server time by Sorting locally
@@ -406,10 +414,6 @@ public abstract class Cmd {
throw new CadiException(build(new StringBuilder("Invalid Option: "),null).toString());
}
-// protected RosettaEnv env() {
-// return aafcli.env;
-// }
-
protected HMangr hman() {
return aafcli.hman;
}
@@ -475,7 +479,9 @@ public abstract class Cmd {
}
public void reportLine() {
- for (int i=0;i<lineLength;++i)pw().print('-');
+ for (int i=0;i<lineLength;++i) {
+ pw().print('-');
+ }
pw().println();
}
@@ -520,11 +526,7 @@ public abstract class Cmd {
return parent.toString();
}
}
-
-// private String getOrgRealm() {
-// return ;
-// }
-//
+
/**
* Appends shortID with Realm, but only when allowed by Organization
* @throws OrganizationException