diff options
author | 2021-08-27 15:24:06 -0400 | |
---|---|---|
committer | 2021-08-27 16:08:00 -0400 | |
commit | f4580fa8a931c84b36d59e2ef853d1fba3d5917e (patch) | |
tree | 0c6a047fadfa26898af614460ac8699f2aa4a4ab /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src | |
parent | 9d8894092ced589c0bdc5b9e85ee1bf1c85d3e36 (diff) |
Fix sonars in apex-pdp #2
plugins-events thru plugins-persistence-jpa-eclipselink
Fixed:
- use "var"
- disambiguate method parameter types
- rename parameter
Issue-ID: POLICY-3093
Change-Id: Ife5897015be495403e731754d5862b803a217c87
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src')
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java index 3bfde18e3..ad3d77bf1 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2019-2020 Nordix Foundation. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -171,7 +172,7 @@ public class ApexRestServerConsumer extends ApexPluginsEventConsumer { .entity("{'errorMessage', '" + errorMessage + ", " + e.getMessage() + "'}").build(); } - final SynchronousEventCache synchronousEventCache = + final var synchronousEventCache = (SynchronousEventCache) peerReferenceMap.get(EventHandlerPeeredMode.SYNCHRONOUS); // Wait until the event is in the cache of events sent to apex do { diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducer.java index 03913e081..f3579565a 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducer.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducer.java @@ -118,7 +118,7 @@ public class ApexRestServerProducer implements ApexEventProducer { } // If we are not synchronized, then exit - final SynchronousEventCache synchronousEventCache = + final var synchronousEventCache = (SynchronousEventCache) peerReferenceMap.get(EventHandlerPeeredMode.SYNCHRONOUS); if (synchronousEventCache == null) { return; |