Fix raw types build warnings 55/102355/2
authorguillaume.lambert <guillaume.lambert@orange.com>
Tue, 13 Sep 2022 07:28:43 +0000 (09:28 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Tue, 13 Sep 2022 09:29:57 +0000 (11:29 +0200)
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I090a9063f24fc826944de3f31f2c99dbbc0a4c1e

pce/src/test/java/org/opendaylight/transportpce/pce/utils/NotificationPublishServiceMock.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java
renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/NotificationPublishServiceMock.java
tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/TapiNetworkModelServiceImpl.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/AbstractDataObjectConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/DataObjectConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/XMLDataObjectConverter.java

index cc4237a7892b975963d0ba76d7acdbc109eb2822..b958f3b8897409a8a2861de5df1e6cc4abd4aad3 100644 (file)
@@ -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");
     }
index 48f0aa14dc378060e99b3a7a8419dfa2417967f6..5a4754037fe4a40e984aa98e6dfdbf2029f76ff4 100644 (file)
@@ -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);
index 1b2ce3afb0c439cc11783534184d12baae4abfd9..582903b1b4f666dece3ebf08ae2b7a03b3175366 100644 (file)
@@ -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");
     }
index 3eeb7a34fdc100d5e4251523b9c78dd695908f59..ff29646f79c34ccdb872d75131ae1b96c9faf3d6 100644 (file)
@@ -260,6 +260,7 @@ public class TapiNetworkModelServiceImpl implements TapiNetworkModelService {
         LOG.info("Updated TAPI topology successfully.");
     }
 
+    @SuppressWarnings("rawtypes")
     private void sendNotification(List<Uuid> changedOneps, Mapping mapping) {
         Notification notification = new NotificationBuilder()
             .setNotificationType(NotificationType.ATTRIBUTEVALUECHANGE)
index 31245389ca5ba4edc0e86019b0ac6d04945472d0..594a5d69c72ed3487716a5a8f6379518a5fca34b 100644 (file)
@@ -111,6 +111,7 @@ public abstract class AbstractDataObjectConverter implements DataObjectConverter
     }
 
     @Override
+    @SuppressWarnings("rawtypes")
     public <T extends DataObject> Optional<NormalizedNode> toNormalizedNodes(@Nonnull T object,
             Class dataObjectClass) {
         Entry<YangInstanceIdentifier, NormalizedNode> normalizedNode =
@@ -137,6 +138,7 @@ public abstract class AbstractDataObjectConverter implements DataObjectConverter
     }
 
     @Override
+    @SuppressWarnings("rawtypes")
     public <T extends Notification> ConvertType<T> notification() {
         return (object, objectClass) -> {
             ContainerNode normalizedNodeNotification = getCodecRegistry().toNormalizedNodeNotification(object);
index d6cbcae988f97c48b5ce58db0e84a27ac671d57f..d8614ffa7534dd90ffa30201b7d4f3e223cd05ff 100644 (file)
@@ -43,8 +43,8 @@ public interface DataObjectConverter {
     <T extends DataObject> Writer writerFromRpcDataObject(@Nonnull DataObject object, Class<T> dataObjectClass,
             ConvertType<T> convertType, QName rpcOutputQName, String rpcName);
 
-    <T extends DataObject> Optional<NormalizedNode> toNormalizedNodes(@Nonnull T object,
-            Class dataObjectClass);
+    @SuppressWarnings("rawtypes")
+    <T extends DataObject> Optional<NormalizedNode> toNormalizedNodes(@Nonnull T object, Class dataObjectClass);
 
     interface ConvertType<T> {
         Optional<NormalizedNode> toNormalizedNodes(T object, Class<T> clazz);
@@ -73,6 +73,7 @@ public interface DataObjectConverter {
      *
      * @return {@link ConvertType} converter for {@link Notification}
      */
+    @SuppressWarnings("rawtypes")
     <T extends Notification> ConvertType<T> notification();
 
 }
index b973ca758ab0707ee4d6ea40e865712d256e3f52..2361524256dda8d8eefc431f07435235b3b3b7b0 100644 (file)
@@ -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);
             }