AAFcli.java -Declare "value" on a separate line
[aaf/authz.git] / auth / auth-service / src / main / java / org / onap / aaf / auth / service / facade / AuthzFacadeImpl.java
index e85e52e..10138d2 100644 (file)
@@ -171,18 +171,19 @@ public abstract class AuthzFacadeImpl<NSS,PERMS,PERMKEY,ROLES,USERS,USERROLES,DE
         String msgId;
         String[] detail;
         boolean hidemsg = false;
-        if (result.variables==null) {
+        if (result.variables==null || result.variables.length<1) {
             detail = new String[1];
         } else {
-               List<String> dlist = new ArrayList<String>();
-               String os;
-               for(Object s : result.variables) {
-                       if(s!=null && (os=s.toString()).length()>0) {
-                               dlist.add(os);
-                       }
-               }
-               detail = new String[dlist.size()];
-               dlist.toArray(detail);
+            List<String> dlist = new ArrayList<String>();
+            dlist.add(null);
+            String os;
+            for(Object s : result.variables) {
+                if(s!=null && (os=s.toString()).length()>0) {
+                    dlist.add(os);
+                }
+            }
+            detail = new String[dlist.size()];
+            dlist.toArray(detail);
         }
         //int httpstatus;
         
@@ -288,6 +289,7 @@ public abstract class AuthzFacadeImpl<NSS,PERMS,PERMKEY,ROLES,USERS,USERROLES,DE
                 break;
             case ERR_ChoiceNeeded:
                 msgId = "SVC1300";
+                detail[0] = "Choice Needed";
                 response.setStatus(/*httpstatus=*/300);
                 break;
             case ERR_Backend: