fix potential nullpointer from sonar 93/78993/1
authork.kazak <k.kazak@samsung.com>
Fri, 22 Feb 2019 08:00:16 +0000 (09:00 +0100)
committerk.kazak <k.kazak@samsung.com>
Fri, 22 Feb 2019 08:00:16 +0000 (09:00 +0100)
commitedc2b5329e4dde7b5dcb01b8a8bccf51a8064131
tree8b32df089e0976af75c73e3d02af99fedfa1584e
parentf8842dbd4065e0b90d4ed0d4af9e4cc72ca218dd
fix potential nullpointer from sonar

MsoMulticloudUtils: multicloudClient may be null
throw MsoException if it is null (instead of NullPointer)
removed unnecessary StackInfo object creation
using format specifiers for a logger instead of String concatenation
removed else block to make the code easier to read
Added tests for the method

Change-Id: I80d2e0ba2ef2d20c488cdfcf103d9cfa5784ab65
Issue-ID: SO-1516
Signed-off-by: k.kazak <k.kazak@samsung.com>
adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java [new file with mode: 0644]