Fix Blocker/Critical sonar issues in dashboard module
https://sonar.onap.org/component_issues?id=org.onap.oom.dashboard%3Aoom-app-parent#resolved=false|severities=CRITICAL
Fixed Use isEmpty() to check whether the collection is empty or not.
Issue-Id: CCSDK-67
Change-Id: Ib4c04759eb80473232c83c617894ead892531b46
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
@SuppressWarnings("unchecked")
// Get the single app.
List<App> list = dataAccessService.getList(App.class, null);
- if (list.size() > 0)
+ if (!list.isEmpty())
healthStatus = new HealthStatus(200, SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME) + " health check succeeded");
else
healthStatus = new HealthStatus(500, SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME) + " health check failed to run db query");