X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Ftasks%2FRicSynchronizationTask.java;h=a42135ef335e594696c45206ae9e27cf5c758fe2;hb=refs%2Fchanges%2F31%2F2831%2F3;hp=0a0ab826665438fdd3b895e8350d6be55697ccc4;hpb=c5c251953f36a3a56613ad28f2d73f958ff58295;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java b/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java index 0a0ab826..a42135ef 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java @@ -55,6 +55,7 @@ import reactor.core.publisher.Mono; *
* Notify subscribing services */ +@SuppressWarnings("squid:S2629") // Invoke method(s) only conditionally public class RicSynchronizationTask { private static final Logger logger = LoggerFactory.getLogger(RicSynchronizationTask.class); @@ -72,7 +73,7 @@ public class RicSynchronizationTask { this.services = services; } - @SuppressWarnings("squid:S2629") // Invoke method(s) only conditionally + @SuppressWarnings("squid:S2445") // Blocks should be synchronized on "private final" fields public void run(Ric ric) { logger.debug("Handling ric: {}", ric.getConfig().name()); @@ -101,7 +102,6 @@ public class RicSynchronizationTask { return Flux.concat(recoverTypes, policiesDeletedInRic, policiesRecreatedInRic); } - @SuppressWarnings("squid:S2629") // Invoke method(s) only conditionally private void onSynchronizationComplete(Ric ric) { logger.info("Synchronization completed for: {}", ric.name()); ric.setState(RicState.IDLE); @@ -124,7 +124,6 @@ public class RicSynchronizationTask { } } - @SuppressWarnings("squid:S2629") // Invoke method(s) only conditionally private void onSynchronizationError(Ric ric, Throwable t) { logger.warn("Synchronization failed for ric: {}, reason: {}", ric.name(), t.getMessage()); // If synchronization fails, try to remove all instances @@ -142,7 +141,6 @@ public class RicSynchronizationTask { () -> onSynchronizationComplete(ric)); } - @SuppressWarnings("squid:S2629") // Invoke method(s) only conditionally private void onRecoveryError(Ric ric, Throwable t) { logger.warn("Synchronization failure recovery failed for ric: {}, reason: {}", ric.name(), t.getMessage()); ric.setState(RicState.UNDEFINED);