diff options
Diffstat (limited to 'auth')
-rw-r--r-- | auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Cmd.java | 36 |
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 |