Refactor ArtifactsBusinessLogic::getRelatedComponentInstance 10/107410/3
authorFrancis Toth <francis.toth@yoppworks.com>
Fri, 8 May 2020 20:31:04 +0000 (16:31 -0400)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Thu, 21 May 2020 06:34:12 +0000 (06:34 +0000)
commit0a65c2fe97240e892c8c65af2c9e6048aa350857
treeaa9d1f617c670b7c1b19bfcc0846bc59e0f6e3ef
parentb8cea3e1099d47a61c95709d26d1742446d8e2c5
Refactor ArtifactsBusinessLogic::getRelatedComponentInstance

This commit aims to refactor the ArtifactsBusinessLogic::getRelatedComponentInstance, and getRelatedComponentComponentInstance. It improves how Either is used, fixes a potential NullPointerException, reduces some duplication along with cyclomatic complexity.

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I2503f5e2a697f793e4dcf32d7793f83c4a25ff46
Issue-ID: SDC-2812
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java