From 7e966914050e66219689001ff4ab601a49eef0ac Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 7 Sep 2018 13:43:23 -0500 Subject: Mass whitespace changes (Style Warnings) Issue-ID: AAF-473 Change-Id: Ia1b3825a527bd56299949b5962bb9354dffbeef8 Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/auth/hello/AAF_Hello.java | 2 +- .../src/main/java/org/onap/aaf/auth/hello/API_Hello.java | 14 +++++++------- .../java/org/onap/aaf/auth/hello/test/HelloTester.java | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'auth/auth-hello/src') diff --git a/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/AAF_Hello.java b/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/AAF_Hello.java index 34371a1f..9190c665 100644 --- a/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/AAF_Hello.java +++ b/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/AAF_Hello.java @@ -70,7 +70,7 @@ public class AAF_Hello extends AbsService { aafAuthn = aafCon().newAuthn(aafLurPerm); String aaf_env = env.getProperty(Config.AAF_ENV); - if(aaf_env==null) { + if (aaf_env==null) { throw new APIException("aaf_env needs to be set"); } diff --git a/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java b/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java index 234dfe14..7fef0ba2 100644 --- a/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java +++ b/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java @@ -68,12 +68,12 @@ public class API_Hello { ServletOutputStream os = resp.getOutputStream(); os.print("Hello AAF "); String perm = pathParam(req, "perm"); - if(perm!=null && perm.length()>0) { + if (perm!=null && perm.length()>0) { os.print('('); os.print(req.getUserPrincipal().getName()); TimeTaken tt = trans.start("Authorize perm", Env.REMOTE); try { - if(req.isUserInRole(perm)) { + if (req.isUserInRole(perm)) { os.print(" has "); } else { os.print(" does not have "); @@ -103,12 +103,12 @@ public class API_Hello { public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(req.getInputStream())); StringBuilder sb = new StringBuilder(); - while(br.ready()) { + while (br.ready()) { sb.append(br.readLine()); } String content = sb.toString(); trans.info().printf("Content from %s: %s\n", pathParam(req, ":id"),content); - if(content.startsWith("{") && content.endsWith("}")) { + if (content.startsWith("{") && content.endsWith("}")) { resp.setStatus(201 /* OK */); } else { resp.getOutputStream().write(NOT_JSON); @@ -130,7 +130,7 @@ public class API_Hello { sb.append('"'); String perm = pathParam(req, "perm"); trans.info().printf("Read request from %s: %s\n", pathParam(req, ":id"),perm); - if(perm!=null && perm.length()>0) { + if (perm!=null && perm.length()>0) { TimeTaken tt = trans.start("Authorize perm", Env.REMOTE); try { sb.append(",\"validation\": { \"permission\" : \""); @@ -157,12 +157,12 @@ public class API_Hello { public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(req.getInputStream())); StringBuilder sb = new StringBuilder(); - while(br.ready()) { + while (br.ready()) { sb.append(br.readLine()); } String content = sb.toString(); trans.info().printf("Content from %s: %s\n", pathParam(req, ":id"),content); - if(content.startsWith("{") && content.endsWith("}")) { + if (content.startsWith("{") && content.endsWith("}")) { resp.setStatus(200 /* OK */); resp.getOutputStream().print(content); } else { diff --git a/auth/auth-hello/src/test/java/org/onap/aaf/auth/hello/test/HelloTester.java b/auth/auth-hello/src/test/java/org/onap/aaf/auth/hello/test/HelloTester.java index f41826d9..e85431d3 100644 --- a/auth/auth-hello/src/test/java/org/onap/aaf/auth/hello/test/HelloTester.java +++ b/auth/auth-hello/src/test/java/org/onap/aaf/auth/hello/test/HelloTester.java @@ -46,7 +46,7 @@ public class HelloTester { try { Define.set(access); String uriPrefix = access.getProperty("locatorURI",null); - if(uriPrefix==null) { + if (uriPrefix==null) { System.out.println("You must add \"locatorURI=\" to the command line or VM_Args"); } else { SecurityInfoC si = SecurityInfoC.instance(access, HttpURLConnection.class); @@ -57,12 +57,12 @@ public class HelloTester { String pathinfo = "/hello"; final int iterations = Integer.parseInt(access.getProperty("iterations","5")); System.out.println("Calling " + loc + " with Path " + pathinfo + ' ' + iterations + " time" + (iterations==1?"":"s")); - for(int i=0;i () { @Override public Void code(Rcli client) throws CadiException, ConnectException, APIException { Future fs = client.read("/hello","text/plain"); - if(fs.get(5000)) { + if (fs.get(5000)) { System.out.print(fs.body()); } else { System.err.println("Ooops, missed one: " + fs.code() + ": " + fs.body()); -- cgit 1.2.3-korg