diff options
author | Rich Tabedzki <richard.tabedzki@att.com> | 2018-02-07 16:24:22 +0000 |
---|---|---|
committer | Rich Tabedzki <richard.tabedzki@att.com> | 2018-02-07 16:45:58 +0000 |
commit | c1b07fc0fea90bc937f1aefd4afb65732944207a (patch) | |
tree | 27f66d1080f353fa48082c6e0b1cb273eb89e242 /aai-service/provider/src/main | |
parent | f7e256387f9995d1d08adf5d8f7534c332432f87 (diff) |
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 <richard.tabedzki@att.com>
Diffstat (limited to 'aai-service/provider/src/main')
-rwxr-xr-x | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java | 18 |
1 files changed, 9 insertions, 9 deletions
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); } } } |