diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-12-03 16:07:40 +0530 |
---|---|---|
committer | Sandeep J <sandeejh@in.ibm.com> | 2018-12-03 16:07:47 +0530 |
commit | 908d126c53c1a73ce8b11240c65b5beeffd7e012 (patch) | |
tree | 349ceb872ef936dcb48fc7ba541146e263f2daee | |
parent | 409a44b5b0b510af613e2036712c340486bae410 (diff) |
fixed sonar issue in PolicyFinderServiceImpl.java
fixed sonar issue
Issue-ID: CCSDK-525
Change-Id: I2074cff32ab26db5ba94bea9d08f0d60bdd9b189
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r-- | ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java | 4 |
1 files changed, 3 insertions, 1 deletions
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<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; } |