diff options
author | surya-huawei <a.u.surya@huawei.com> | 2017-10-12 10:42:37 +0530 |
---|---|---|
committer | surya-huawei <a.u.surya@huawei.com> | 2017-10-12 10:47:32 +0530 |
commit | 9c72587e6a8303bf93586823907165ce9913a19f (patch) | |
tree | 00a9d8967d8b5ef7d65ce77d82f7222ed85ce22d /aai-service/provider/src/main | |
parent | 69afaf3212efcdbf90ed365a1b64e8f87765390b (diff) |
Remove toString called on String object
*Removed toString on a string object
This is a redundant construction and saves keystrokes
*Replace type specification in constructor with diamond operator
This is to reduce verbosity of generics code
Issue-Id: CCSDK-117
Change-Id: I5669450e8b5364eb9b01831b26a77596adf6c21a
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
Diffstat (limited to 'aai-service/provider/src/main')
-rwxr-xr-x | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java index f1663d2d5..0f7e99818 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java @@ -740,7 +740,7 @@ public abstract class AAIDeclarations implements AAIClient { boolean itemRemoved = false; RelationshipList relationshipList = vnf.getRelationshipList(); List<Relationship> relationships = relationshipList.getRelationship(); - List<Relationship> iterableList = new LinkedList<Relationship>(relationships); + List<Relationship> iterableList = new LinkedList<>(relationships); for(Relationship relationship : iterableList) { if(relationship.getRelatedTo().equals(relatedTo)) { relationships.remove(relationship); @@ -1154,7 +1154,7 @@ public abstract class AAIDeclarations implements AAIClient { List<String> newValues = new ArrayList<>(); String length = id+"_length"; if(!params.isEmpty() && params.containsKey(length)) { - String tmp = params.get(length).toString(); + String tmp = params.get(length); int count = Integer.parseInt(tmp); for(int i=0; i<count; i++) { String tmpValue = params.get(String.format("%s[%d]", id, i)); @@ -1296,7 +1296,7 @@ public abstract class AAIDeclarations implements AAIClient { relationship.setRelatedLink(relatedLink); } else { // List<RelationshipData> relData = relationship.getRelationshipData(); - Map<String, String> relParams = new HashMap<String, String>(); + Map<String, String> relParams = new HashMap<>(); while(true) { String searchRelationshipKey = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-key"; @@ -1544,7 +1544,7 @@ public abstract class AAIDeclarations implements AAIClient { boolean createdNewRelationships = false; List<Relationship> relationships = relationshipList.getRelationship(); if(relationships == null) { - relationships = new ArrayList<Relationship>(); + relationships = new ArrayList<>(); createdNewRelationships = true; } @@ -1745,7 +1745,7 @@ public abstract class AAIDeclarations implements AAIClient { } List<Relationship> relationships = relationshipList.getRelationship(); - List<Relationship> relationshipsToDelete = new LinkedList<Relationship>(); + List<Relationship> relationshipsToDelete = new LinkedList<>(); for(Relationship relationship : relationships) { if(relatedTo.equals(relationship.getRelatedTo())) { |