fixed sonar issue in PolicyFinderServiceImpl.java 31/74131/1
authorSandeep J <sandeejh@in.ibm.com>
Mon, 3 Dec 2018 10:37:40 +0000 (16:07 +0530)
committerSandeep J <sandeejh@in.ibm.com>
Mon, 3 Dec 2018 10:37:47 +0000 (16:07 +0530)
fixed sonar issue

Issue-ID: CCSDK-525
Change-Id: I2074cff32ab26db5ba94bea9d08f0d60bdd9b189
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java

index e93675b..b30ac0e 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2018 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
@@ -74,7 +76,7 @@ public class PolicyFinderServiceImpl implements PolicyFinder {
         if (response instanceof List) {
             @SuppressWarnings("unchecked")
             List<Map<String, Object>> policyList = (List<Map<String, Object>>) response;
-            return ((policyList != null && policyList.size() > 0) ? policyList.get(0) : null);
+            return ((!policyList.isEmpty()) ? policyList.get(0) : null);
         } else {
             return null;
         }