From 1167aaaa7aa0f049dbc94fe6b78e4e17d54d565b Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 4 Sep 2018 15:23:00 +0530 Subject: fixed sonar major issue in MsoNetworkAdapterImpl fixed sonar issue as detailed in SO-967 Issue-ID: SO-967 Change-Id: I4310dc3ad46d302a2d014a708c2f14c02ad3a5f2 Signed-off-by: Sandeep J --- .../org/onap/so/adapters/network/MsoNetworkAdapterImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'adapters') diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index e5a8d3faa1..c8df1fdac2 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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 @@ -465,7 +467,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Map outputs = heatStack.getOutputs (); Map sMap = new HashMap <> (); if (outputs != null) { - for (String key : outputs.keySet ()) { + for (Map.Entry entry : outputs.entrySet()) { + String key=entry.getKey(); if (key != null && key.startsWith ("subnet")) { if (aic3template) //one subnet_id output { @@ -619,7 +622,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Map outputs = heatStack.getOutputs (); Map sMap = new HashMap <> (); if (outputs != null) { - for (String key : outputs.keySet ()) { + for (Map.Entry entry : outputs.entrySet()) { + String key = entry.getKey(); if (key != null && key.startsWith ("subnet")) { if (aic3template) //one subnet output expected { @@ -1067,7 +1071,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { Map outputs = heatStack.getOutputs(); Map sMap = new HashMap<>(); if (outputs != null) { - for (String key : outputs.keySet()) { + for (Map.Entry entry : outputs.entrySet()) { + String key=entry.getKey(); if (key != null && key.startsWith("subnet")) { if (aic3template) //one subnet output expected { -- cgit 1.2.3-korg