From 9711e3f13fe6bfc9370d8f499fd1140f45e9ee5b Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Tue, 13 Sep 2022 09:28:43 +0200 Subject: [PATCH] Fix raw types build warnings Signed-off-by: guillaume.lambert Change-Id: I090a9063f24fc826944de3f31f2c99dbbc0a4c1e --- .../pce/utils/NotificationPublishServiceMock.java | 8 ++++---- .../provisiondevice/RendererServiceOperationsImpl.java | 2 +- .../renderer/utils/NotificationPublishServiceMock.java | 8 ++++---- .../tapi/topology/TapiNetworkModelServiceImpl.java | 1 + .../test/converter/AbstractDataObjectConverter.java | 2 ++ .../transportpce/test/converter/DataObjectConverter.java | 5 +++-- .../test/converter/XMLDataObjectConverter.java | 4 ++-- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/pce/src/test/java/org/opendaylight/transportpce/pce/utils/NotificationPublishServiceMock.java b/pce/src/test/java/org/opendaylight/transportpce/pce/utils/NotificationPublishServiceMock.java index cc4237a78..b958f3b88 100644 --- a/pce/src/test/java/org/opendaylight/transportpce/pce/utils/NotificationPublishServiceMock.java +++ b/pce/src/test/java/org/opendaylight/transportpce/pce/utils/NotificationPublishServiceMock.java @@ -19,19 +19,19 @@ public class NotificationPublishServiceMock implements NotificationPublishServic private static final Logger LOG = LoggerFactory.getLogger(NotificationPublishServiceMock.class); @Override - public void putNotification(Notification notification) throws InterruptedException { + public void putNotification(Notification notification) throws InterruptedException { LOG.info("putNotification"); } @Override - public ListenableFuture offerNotification(Notification notification) { + public ListenableFuture offerNotification(Notification notification) { LOG.info("offerNotification"); throw new UnsupportedOperationException("offerNotification is not implemented"); } @Override - public ListenableFuture offerNotification(Notification notification, int timeout, TimeUnit unit) - throws InterruptedException { + public ListenableFuture offerNotification(Notification notification, int timeout, TimeUnit unit) + throws InterruptedException { LOG.info("offerNotification"); throw new UnsupportedOperationException("offerNotification is not implemented"); } diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java index 48f0aa14d..5a4754037 100644 --- a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java +++ b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java @@ -954,7 +954,7 @@ public class RendererServiceOperationsImpl implements RendererServiceOperations * Send renderer notification. * @param notification Notification */ - private void send(Notification notification) { + private void send(Notification notification) { try { LOG.info("Sending notification {}", notification); notificationPublishService.putNotification(notification); diff --git a/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/NotificationPublishServiceMock.java b/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/NotificationPublishServiceMock.java index 1b2ce3afb..582903b1b 100644 --- a/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/NotificationPublishServiceMock.java +++ b/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/NotificationPublishServiceMock.java @@ -19,19 +19,19 @@ public class NotificationPublishServiceMock implements NotificationPublishServic private static final Logger LOG = LoggerFactory.getLogger(NotificationPublishServiceMock.class); @Override - public void putNotification(Notification notification) throws InterruptedException { + public void putNotification(Notification notification) throws InterruptedException { LOG.info("putNotification"); } @Override - public ListenableFuture offerNotification(Notification notification) { + public ListenableFuture offerNotification(Notification notification) { LOG.info("offerNotification"); throw new UnsupportedOperationException("offerNotification is not implemented"); } @Override - public ListenableFuture offerNotification(Notification notification, int timeout, TimeUnit unit) - throws InterruptedException { + public ListenableFuture offerNotification(Notification notification, int timeout, TimeUnit unit) + throws InterruptedException { LOG.info("offerNotification"); throw new UnsupportedOperationException("offerNotification is not implemented"); } diff --git a/tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/TapiNetworkModelServiceImpl.java b/tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/TapiNetworkModelServiceImpl.java index 3eeb7a34f..ff29646f7 100644 --- a/tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/TapiNetworkModelServiceImpl.java +++ b/tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/TapiNetworkModelServiceImpl.java @@ -260,6 +260,7 @@ public class TapiNetworkModelServiceImpl implements TapiNetworkModelService { LOG.info("Updated TAPI topology successfully."); } + @SuppressWarnings("rawtypes") private void sendNotification(List changedOneps, Mapping mapping) { Notification notification = new NotificationBuilder() .setNotificationType(NotificationType.ATTRIBUTEVALUECHANGE) diff --git a/test-common/src/main/java/org/opendaylight/transportpce/test/converter/AbstractDataObjectConverter.java b/test-common/src/main/java/org/opendaylight/transportpce/test/converter/AbstractDataObjectConverter.java index 31245389c..594a5d69c 100644 --- a/test-common/src/main/java/org/opendaylight/transportpce/test/converter/AbstractDataObjectConverter.java +++ b/test-common/src/main/java/org/opendaylight/transportpce/test/converter/AbstractDataObjectConverter.java @@ -111,6 +111,7 @@ public abstract class AbstractDataObjectConverter implements DataObjectConverter } @Override + @SuppressWarnings("rawtypes") public Optional toNormalizedNodes(@Nonnull T object, Class dataObjectClass) { Entry normalizedNode = @@ -137,6 +138,7 @@ public abstract class AbstractDataObjectConverter implements DataObjectConverter } @Override + @SuppressWarnings("rawtypes") public ConvertType notification() { return (object, objectClass) -> { ContainerNode normalizedNodeNotification = getCodecRegistry().toNormalizedNodeNotification(object); diff --git a/test-common/src/main/java/org/opendaylight/transportpce/test/converter/DataObjectConverter.java b/test-common/src/main/java/org/opendaylight/transportpce/test/converter/DataObjectConverter.java index d6cbcae98..d8614ffa7 100644 --- a/test-common/src/main/java/org/opendaylight/transportpce/test/converter/DataObjectConverter.java +++ b/test-common/src/main/java/org/opendaylight/transportpce/test/converter/DataObjectConverter.java @@ -43,8 +43,8 @@ public interface DataObjectConverter { Writer writerFromRpcDataObject(@Nonnull DataObject object, Class dataObjectClass, ConvertType convertType, QName rpcOutputQName, String rpcName); - Optional toNormalizedNodes(@Nonnull T object, - Class dataObjectClass); + @SuppressWarnings("rawtypes") + Optional toNormalizedNodes(@Nonnull T object, Class dataObjectClass); interface ConvertType { Optional toNormalizedNodes(T object, Class clazz); @@ -73,6 +73,7 @@ public interface DataObjectConverter { * * @return {@link ConvertType} converter for {@link Notification} */ + @SuppressWarnings("rawtypes") ConvertType notification(); } diff --git a/test-common/src/main/java/org/opendaylight/transportpce/test/converter/XMLDataObjectConverter.java b/test-common/src/main/java/org/opendaylight/transportpce/test/converter/XMLDataObjectConverter.java index b973ca758..236152425 100644 --- a/test-common/src/main/java/org/opendaylight/transportpce/test/converter/XMLDataObjectConverter.java +++ b/test-common/src/main/java/org/opendaylight/transportpce/test/converter/XMLDataObjectConverter.java @@ -146,8 +146,8 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter { xmlStreamWriter.writeStartElement(XMLConstants.DEFAULT_NS_PREFIX, rpcOutputQName.getLocalName(), rpcOutputQName.getNamespace().toString()); xmlStreamWriter.writeDefaultNamespace(rpcOutputQName.getNamespace().toString()); - NormalizedNode rpcOutputNormalizedNode = convertType.toNormalizedNodes(dataObjectClass.cast(object), - dataObjectClass).get(); + NormalizedNode rpcOutputNormalizedNode = + convertType.toNormalizedNodes(dataObjectClass.cast(object), dataObjectClass).get(); for (final NormalizedNode child : ((ContainerNode)rpcOutputNormalizedNode).body()) { normalizedNodeWriter.write(child); } -- 2.36.6