From f0d1af58a2d41ce328c0599dadce4878efca0e90 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Wed, 9 Jan 2019 16:29:06 +0530 Subject: fixed sonar issues in NamedQueryRequest.java fixed sonar issues Issue-ID: CCSDK-525 Change-Id: I2947dc37fd46a07ceeed8a2014845f898b8d9699 Signed-off-by: Sandeep J --- .../org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'aai-service/provider/src') diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java index 691ae27a3..d1995f04f 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -107,7 +109,7 @@ public class NamedQueryRequest extends AAIRequest { if(innerChild != null) { if(innerChild instanceof ObjectNode) { ObjectNode on = ObjectNode.class.cast(innerChild); - List namesToDelete = new ArrayList(); + List namesToDelete = new ArrayList<>(); Iterator names = on.fieldNames(); while(names.hasNext()) { String name = names.next(); @@ -125,7 +127,7 @@ public class NamedQueryRequest extends AAIRequest { if(innerChild != null) { if(innerChild instanceof ObjectNode) { ObjectNode on = ObjectNode.class.cast(innerChild); - List namesToDelete = new ArrayList(); + List namesToDelete = new ArrayList<>(); Iterator names = on.fieldNames(); while(names.hasNext()) { String name = names.next(); @@ -143,7 +145,7 @@ public class NamedQueryRequest extends AAIRequest { if(innerChild != null) { if(innerChild instanceof ObjectNode) { ObjectNode on = ObjectNode.class.cast(innerChild); - List namesToDelete = new ArrayList(); + List namesToDelete = new ArrayList<>(); Iterator names = on.fieldNames(); while(names.hasNext()) { String name = names.next(); @@ -194,7 +196,7 @@ public class NamedQueryRequest extends AAIRequest { if(requestProperties.containsKey(key)) { encoded_vnf = encodeQuery(requestProperties.getProperty(key)); request_url = request_url.replace("{named-query-uuid}", encoded_vnf) ; - aaiService.LOGwriteDateTrace("named-query-uuid", requestProperties.getProperty(key)); + aaiService.LOGwriteDateTrace(NAMED_QUERY_UUID, requestProperties.getProperty(key)); } key = PREFIX; @@ -202,7 +204,7 @@ public class NamedQueryRequest extends AAIRequest { if(requestProperties.containsKey(key)) { encoded_vnf = encodeQuery(requestProperties.getProperty(key)); request_url = request_url.replace("{prefix}", encoded_vnf) ; - aaiService.LOGwriteDateTrace("prefix", requestProperties.getProperty(key)); + aaiService.LOGwriteDateTrace(PREFIX, requestProperties.getProperty(key)); } return request_url; -- cgit 1.2.3-korg