From c1b07fc0fea90bc937f1aefd4afb65732944207a Mon Sep 17 00:00:00 2001 From: Rich Tabedzki Date: Wed, 7 Feb 2018 16:24:22 +0000 Subject: Fixed as per Java Code Conventions Changes made: * corrected sonar related issues in AAIClientRESTExecutor Change-Id: I9861207fa612c11fb0a872be24085c3db488fd40 Issue-ID: CCSDK-151 Signed-off-by: Rich Tabedzki --- .../ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'aai-service') diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java index 8f624e9e..252f3197 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java @@ -194,7 +194,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { methodsField.set(null, methods); } catch (SecurityException | IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) { - LOG.warn("Adding PATCH method", e); + LOG.warn("Adding PATCH method", e); } LOG.info("AAIResource.ctor initialized."); @@ -332,7 +332,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { try { inputStream.close(); } catch(Exception exc) { - + LOG.warn("", exc); } } } @@ -365,8 +365,8 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { Object object = getResourceVersionMethod.invoke(instance); if(object != null) resourceVersion = object.toString(); - } catch (InvocationTargetException x) { - Throwable cause = x.getCause(); + } catch (InvocationTargetException exc) { + LOG.warn("", exc); } } } catch(Exception exc) { @@ -427,7 +427,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { if(inputStream != null) inputStream.close(); } catch (Exception exc) { - + LOG.warn("AAIRequestExecutor.post", exc); } } } @@ -504,7 +504,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { try { inputStream.close(); } catch(Exception exc) { - + LOG.warn("delete", exc); } } } @@ -571,7 +571,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { try { inputStream.close(); } catch(Exception exc) { - + LOG.warn("GET", exc); } } con = null; @@ -625,7 +625,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { while( ( line = reader.readLine() ) != null ) { stringBuilder.append( line ); } - LOGwriteEndingTrace(responseCode, responseMessage, (stringBuilder != null) ? stringBuilder.toString() : "{no-data}"); + LOGwriteEndingTrace(responseCode, responseMessage, (stringBuilder.length() > 0) ? stringBuilder.toString() : "{no-data}"); return true; } else { StringBuilder stringBuilder = new StringBuilder(); @@ -651,7 +651,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { if(inputStream != null) inputStream.close(); } catch (Exception exc) { - + LOG.warn("AAIRequestExecutor.patch", exc); } } } -- cgit 1.2.3-korg