Clean up warnings in aaa-encrypt-service 12/109912/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 22 Jan 2024 17:11:52 +0000 (18:11 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 22 Jan 2024 17:12:55 +0000 (18:12 +0100)
We have deprecation warnings, migrate them. While we are at it, also
suppress a static warning on deactivate().

Change-Id: If10e271fecc6aebbc3230b561d48527ce2f68d28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
aaa-encrypt-service/impl/src/main/java/org/opendaylight/aaa/encrypt/impl/AAAEncryptionServiceImpl.java
aaa-encrypt-service/impl/src/main/java/org/opendaylight/aaa/encrypt/impl/OSGiEncryptionServiceConfigurator.java
aaa-encrypt-service/impl/src/test/java/org/opendaylight/aaa/encrypt/impl/OSGiEncryptionServiceConfiguratorTest.java

index 5789dccbad93c9fd0432df21ec9b575d1203076f..695c204f40a0703e96ed3027c4c36582a7f71a31 100644 (file)
@@ -98,6 +98,7 @@ public final class AAAEncryptionServiceImpl implements AAAEncryptionService {
     }
 
     @Deactivate
+    @SuppressWarnings("static-method")
     void deactivate() {
         LOG.info("AAAEncryptionService deactivated");
     }
index 139d9ff6825fce23c3e3dbae33841171fd3726a3..be485d03c2d88659501e4bf48ccf3926794f8dd4 100644 (file)
@@ -83,7 +83,7 @@ public final class OSGiEncryptionServiceConfigurator implements DataListener<Aaa
         this.dataBroker = requireNonNull(dataBroker);
         this.factory = requireNonNull(factory);
         reg = dataBroker.registerDataListener(
-            DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION,
+            DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION,
                 InstanceIdentifier.create(AaaEncryptServiceConfig.class)),
             this);
         LOG.debug("AAA Encryption Service configurator started");
index 0b9bdadb2ba9aa76fd4a440096fb7238c496b6b1..e2ae73810530029a2748d93e868ce79478cbd158 100644 (file)
@@ -74,7 +74,7 @@ public class OSGiEncryptionServiceConfiguratorTest {
 
         configurator = new OSGiEncryptionServiceConfigurator(dataBroker, factory);
 
-        assertEquals(DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, IID), treeIdCaptor.getValue());
+        assertEquals(DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, IID), treeIdCaptor.getValue());
         assertSame(configurator, listenerCaptor.getValue());
     }