From 908d126c53c1a73ce8b11240c65b5beeffd7e012 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Mon, 3 Dec 2018 16:07:40 +0530 Subject: fixed sonar issue in PolicyFinderServiceImpl.java fixed sonar issue Issue-ID: CCSDK-525 Change-Id: I2074cff32ab26db5ba94bea9d08f0d60bdd9b189 Signed-off-by: Sandeep J --- .../apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ms/neng') diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java index e93675bf..b30ac0e6 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java @@ -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> policyList = (List>) response; - return ((policyList != null && policyList.size() > 0) ? policyList.get(0) : null); + return ((!policyList.isEmpty()) ? policyList.get(0) : null); } else { return null; } -- cgit 1.2.3-korg