Merge "AAFcli.java -Declare "value" on a separate line"
[aaf/authz.git] / cadi / aaf / src / test / java / org / onap / aaf / cadi / aaf / test / TestHClient.java
index 8cb4e90..18e72b4 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.
@@ -44,25 +44,25 @@ public class TestHClient {
         try {
             PropAccess access = new PropAccess(args);
             String aaf_url = access.getProperty(Config.AAF_URL);
-            if(aaf_url == null) {
+            if (aaf_url == null) {
                 access.log(Level.ERROR, Config.AAF_URL," is required");
             } else {
                 HMangr hman = null;
                 try {
                     SecurityInfoC<HttpURLConnection> si = SecurityInfoC.instance(access, HttpURLConnection.class);
                     AbsAAFLocator<BasicTrans> loc = new AAFLocator(si,new URI(aaf_url));
-                    for(Item item = loc.first(); item!=null; item=loc.next(item)) {
+                    for (Item item = loc.first(); item!=null; item=loc.next(item)) {
                         System.out.println(loc.get(item));
                     }
-                    
+
                     hman = new HMangr(access,loc);
                     final String path = String.format("/authz/perms/user/%s",
                             access.getProperty(Config.AAF_APPID,"xx9999@people.osaaf.org"));
                     hman.best(si.defSS, new Retryable<Void>() {
                         @Override
                         public Void code(Rcli<?> cli) throws APIException, CadiException {
-                            Future<String> ft = cli.read(path,"application/json");  
-                            if(ft.get(10000)) {
+                            Future<String> ft = cli.read(path,"application/json");
+                            if (ft.get(10000)) {
                                 System.out.println("Hurray,\n"+ft.body());
                             } else {
                                 System.out.println("not quite: " + ft.code());
@@ -70,7 +70,7 @@ public class TestHClient {
                             return null;
                         }});
                 } finally {
-                    if(hman!=null) {
+                    if (hman!=null) {
                         hman.close();
                     }
                 }
@@ -79,5 +79,5 @@ public class TestHClient {
             e.printStackTrace();
         }
     }
-    
+
 }