BUG-731 Fix sonar warnings present in code for BUG-338

Change-Id: I9c3b34f0fbdefd6174ce59c97968746ba3886b98
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>