Fix a few warnings 21/104721/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Mar 2023 13:07:10 +0000 (14:07 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Mar 2023 13:07:10 +0000 (14:07 +0100)
Eclipse complains about unaccessed field, which we need for
serialization -- fix that by exposing the class to the entire package.

Also use local variable type inference to remove nullness warning.

Change-Id: Ib37d8e6b5d535c68eb578a67ac980e5de370c94f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/DataJournalV0.java
opendaylight/md-sal/sal-akka-segmented-journal/src/test/java/org/opendaylight/controller/akka/segjournal/SegmentedFileJournalTest.java

index 567a08079387305de9b873ef73840b0130764617..93c93f8acc776e10f1de5b24c746426a0ed28801 100644 (file)
@@ -140,7 +140,7 @@ final class DataJournalV0 extends DataJournal {
             }
 
             LOG.trace("{}: starting append of {}", persistenceId, payload);
-            final Indexed<ToPersistence> entry = writer.append(new ToPersistence(repr));
+            final var entry = writer.append(new ToPersistence(repr));
             final int size = entry.size();
             LOG.trace("{}: finished append of {} with {} bytes at {}", persistenceId, payload, size, entry.index());
             recordMessageSize(size);
index 6bd1a8f97e5e7ebd3c2aba1a5afbcf8c9ec488b8..0d432979d022d6bb348e451114870472b085acae 100644 (file)
@@ -251,7 +251,7 @@ public class SegmentedFileJournalTest {
         return future.value().get().get();
     }
 
-    private static final class LargePayload implements Serializable {
+    static final class LargePayload implements Serializable {
         private static final long serialVersionUID = 1L;
 
         final byte[] bytes = new byte[MESSAGE_SIZE / 2];