summaryrefslogtreecommitdiffstats
path: root/auth/auth-cmd/src
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-cmd/src')
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java10
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java6
2 files changed, 5 insertions, 11 deletions
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java
index cc9ccf98..d41f0cf3 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java
@@ -38,7 +38,6 @@ public class Cred extends Cmd {
public static final String ATTEMPT_FAILED_SPECIFICS_WITHELD = "Attempt Failed. Specifics witheld.";
private static final String CRED_PATH = "/authn/cred";
private static final String[] options = {"add","del","reset","extend"/*,"clean"*/};
-// private Clean clean;
public Cred(User parent) {
super(parent,"cred",
new Param(optionsToString(options),true),
@@ -46,7 +45,6 @@ public class Cred extends Cmd {
new Param("password (! D|E)",false),
new Param("entry# (if multi)",false)
);
-// clean = new Clean(this);
}
@Override
@@ -62,11 +60,10 @@ public class Cred extends Cmd {
cr.setPassword(args[idx++]);
}
if (args.length>idx)
- cr.setEntry(args[idx++]);
+ cr.setEntry(args[idx]);
// Set Start/End commands
setStartEnd(cr);
-// final int cleanIDX = _idx+1;
Integer ret = same(new Retryable<Integer>() {
@Override
public Integer code(Rcli<?> client) throws CadiException, APIException {
@@ -82,7 +79,6 @@ public class Cred extends Cmd {
verb = "Added Credential [";
break;
case 1:
-// if (aafcli.addForce())cr.setForce("TRUE");
setQueryParamsOn(client);
fp = client.delete(CRED_PATH,
getDF(CredRequest.class),
@@ -106,8 +102,8 @@ public class Cred extends Cmd {
);
verb = "Extended Credential [";
break;
-// case 4:
-// return clean.exec(cleanIDX, args);
+ default:
+ break;
}
if (fp==null) {
return null; // get by Sonar check.
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
index 7b0c1204..80c6d825 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/perm/JU_Create.java
@@ -25,10 +25,6 @@ package org.onap.aaf.auth.cmd.test.perm;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;
-import org.junit.Before;
-
-import org.onap.aaf.auth.cmd.test.HMangrStub;
-
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.Writer;
@@ -36,6 +32,7 @@ import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
+import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -44,6 +41,7 @@ import org.mockito.runners.MockitoJUnitRunner;
import org.onap.aaf.auth.cmd.AAFcli;
import org.onap.aaf.auth.cmd.ns.Create;
import org.onap.aaf.auth.cmd.ns.NS;
+import org.onap.aaf.auth.cmd.test.HMangrStub;
import org.onap.aaf.auth.env.AuthzEnv;
import org.onap.aaf.cadi.CadiException;
import org.onap.aaf.cadi.Locator;