From f4580fa8a931c84b36d59e2ef853d1fba3d5917e Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 27 Aug 2021 15:24:06 -0400 Subject: 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 --- .../apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java | 3 ++- .../apex/plugins/event/carrier/restserver/ApexRestServerProducer.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main') 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; -- cgit 1.2.3-korg