Fix sonar issues in ecomp-portal-BE-common

A "NullPointerException" could be thrown
Replace the type specification in this constructor call with the diamond operator ("<>")
Use isEmpty() to check whether the collection is empty or not

Issue-ID: PORTAL-562
Change-Id: Idbff965861ec837f058bc0ae7073b359d0fcadcc
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2 files changed