From 3b69b59e624ffdedf72c92fc84fcb1cd915db58a Mon Sep 17 00:00:00 2001 From: burdziak Date: Wed, 24 Jan 2018 08:55:08 +0100 Subject: Fixes in AaiInterfaceRulesHandler Issue-ID: APPC-488 Signed-off-by: burdziak Change-Id: Id4976f1d8ef1ec44cdb460f1a6cd65476ba5c0f5 --- .../onap/appc/aai/interfaceImpl/AaiInterfaceRulesHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'appc-outbound/appc-network-inventory-client') diff --git a/appc-outbound/appc-network-inventory-client/provider/src/main/java/org/onap/appc/aai/interfaceImpl/AaiInterfaceRulesHandler.java b/appc-outbound/appc-network-inventory-client/provider/src/main/java/org/onap/appc/aai/interfaceImpl/AaiInterfaceRulesHandler.java index 47a763bfd..6dcb91aa0 100644 --- a/appc-outbound/appc-network-inventory-client/provider/src/main/java/org/onap/appc/aai/interfaceImpl/AaiInterfaceRulesHandler.java +++ b/appc-outbound/appc-network-inventory-client/provider/src/main/java/org/onap/appc/aai/interfaceImpl/AaiInterfaceRulesHandler.java @@ -55,7 +55,7 @@ public class AaiInterfaceRulesHandler implements RuleHandlerInterface { } @Override - public void processRule() throws Exception { + public void processRule() throws IllegalStateException { String fn = "AaiInterfaceIpAddressHandler.processRule"; log.info(fn + "Processing rule :" + parameters.getRuleType()); @@ -77,12 +77,12 @@ public class AaiInterfaceRulesHandler implements RuleHandlerInterface { } } } else { - throw new Exception("NO response Keys set for : " + parameters.getRuleType()); + throw new IllegalStateException("NO response Keys set for : " + parameters.getRuleType()); } processKeys(respKeys, parameters.getName()); } - public void processKeys(ResponseKey filterKey, String aaiKey) throws Exception { + public void processKeys(ResponseKey filterKey, String aaiKey) { String fn = "AaiInterfaceRulesHandler.processKeys()::"; log.info(fn + "processing for " + aaiKey); @@ -119,8 +119,8 @@ public class AaiInterfaceRulesHandler implements RuleHandlerInterface { log.info(fn + "FieldKeyName:" + fieldKeyName + " FilterByName:" + filterByField + " FilterByValue:" + filterByValue); if (StringUtils.equalsIgnoreCase(fieldKeyName, "vserver-name")) { - if (StringUtils.isNotEmpty(filterByField) && StringUtils.isNotEmpty(filterByField) - && StringUtils.isNotEmpty(filterByValue) && StringUtils.isNotEmpty(filterByValue)) { + if (StringUtils.isNotEmpty(filterByField) + && StringUtils.isNotEmpty(filterByValue) ) { int vmIndex = 0; for (AaiVmInfo vm : vnfInfoData.getVmInfo()) { if (StringUtils.equalsIgnoreCase(filterByField, "vm-number") && null != filterByValue) { -- cgit 1.2.3-korg