aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
diff options
context:
space:
mode:
authorSamuel Liard <samuel.liard@gmail.com>2021-10-01 10:09:17 +0200
committerSamuel Liard <samuel.liard@gmail.com>2021-10-01 10:17:43 +0200
commit0f940df172f04ad5261b2443b296b3ab58faf02c (patch)
treeb9b0626100b813dd0185883a2c9e938ab3f920d1 /src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
parent1cc27839c3c1e06de6b52389921db057bd10c6fc (diff)
Fix sonar issues :
Remove all printStackTrace Change split regex Remove all string comparison with != Issue-ID: AAI-3362 Signed-off-by: sliard <samuel.liard@gmail.com> Change-Id: Ia473d0e2d0af5a6cde333e593c42bddd89709167
Diffstat (limited to 'src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java')
-rw-r--r--src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java b/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
index a3085c9..ffe7266 100644
--- a/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
+++ b/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
@@ -145,24 +145,20 @@ public class MigrateSameSourcedRCTROPserverData extends EdgeSwingMigrator {
try {
logger.info("RCT pserver count: "+rctCount);
updateToLatestRCT(pserverTraversalRCT);
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- } catch (AAIException e) {
- e.printStackTrace();
+ } catch (UnsupportedEncodingException | AAIException e) {
+ logger.info("UpdateToLatestRCT error: " + e.getMessage());
}
- List<Vertex> pserverTraversalRO = graphTraversalSource().V().has("aai-node-type", "pserver").has("source-of-truth", P.within("RO", "AAI-EXTENSIONS")).toList();
+ List<Vertex> pserverTraversalRO = graphTraversalSource().V().has("aai-node-type", "pserver").has("source-of-truth", P.within("RO", "AAI-EXTENSIONS")).toList();
int roCount = pserverTraversalRO.size();
try {
logger.info("RO pserver count: "+roCount);
updateToLatestRO(pserverTraversalRO);
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- } catch (AAIException e) {
- e.printStackTrace();
+ } catch (UnsupportedEncodingException | AAIException e) {
+ logger.info("UpdateToLatestRO error: " + e.getMessage());
}
- logger.info ("\n \n ******* Migration Summary Counts for RCT and RO sourced pservers in A&AI ********* \n");
+ logger.info ("\n \n ******* Migration Summary Counts for RCT and RO sourced pservers in A&AI ********* \n");
logger.info(this.MIGRATION_SUMMARY_COUNT + "Total number of RCT pservers: " +rctCount);
logger.info(this.MIGRATION_SUMMARY_COUNT + "Duplicate RCT pserver count: "+ dupRctCount);
logger.info(this.MIGRATION_SUMMARY_COUNT + "Number of RCT updated: "+ rctPserversUpdatedCount);