create.java-remove the useless assignment
[aaf/authz.git] / auth / auth-cmd / src / main / java / org / onap / aaf / auth / cmd / ns / Create.java
index 1719ada..8d4d66a 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,9 +42,9 @@ public class Create extends Cmd {
     private static final String COMMA = ",";
 
     public Create(NS parent) {
-        super(parent,"create", 
+        super(parent,"create",
                 new Param("ns-name",true),
-                new Param("owner (id[,id]*)",true), 
+                new Param("owner (id[,id]*)",true),
                 new Param("admin (id[,id]*)",false));
     }
 
@@ -53,39 +53,39 @@ public class Create extends Cmd {
             int idx = _idx;
 
         final NsRequest nr = new NsRequest();
-        
+
         nr.setName(args[idx++]);
         String[] responsible = args[idx++].split(COMMA);
-        for(String s : responsible) {
+        for (String s : responsible) {
             nr.getResponsible().add(fullID(s));
         }
         String[] admin;
-        if(args.length>idx) {
-            admin = args[idx++].split(COMMA);
+        if (args.length>idx) {
+            admin = args[idx].split(COMMA);
         } else {
             admin = responsible;
         }
-        for(String s : admin) {
+        for (String s : admin) {
             nr.getAdmin().add(fullID(s));
         }
-        
+
         // Set Start/End commands
         setStartEnd(nr);
-        
+
         return same(new Retryable<Integer>() {
             @Override
             public Integer code(Rcli<?> client) throws CadiException, APIException {
                 // Requestable
                 setQueryParamsOn(client);
                 Future<NsRequest> fp = client.create(
-                        "/authz/ns", 
+                        "/authz/ns",
                         getDF(NsRequest.class),
                         nr
                         );
-                if(fp.get(AAFcli.timeout())) {
+                if (fp.get(AAFcli.timeout())) {
                     pw().println("Created Namespace");
                 } else {
-                    if(fp.code()==202) {
+                    if (fp.code()==202) {
                         pw().println("Namespace Creation Accepted, but requires Approvals before actualizing");
                     } else {
                         error(fp);