VersionedExternalizableMessage.getVersion() is final 76/96776/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 2 Jul 2021 10:58:04 +0000 (12:58 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 2 Jul 2021 11:29:08 +0000 (13:29 +0200)
This is a property which is under control of the baseline class,
do not allow it to be modified.

Change-Id: Icab5e415954b27842f5af65ecde75202a0c53589
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/VersionedExternalizableMessage.java

index 16f0313..8643b94 100644 (file)
@@ -26,14 +26,14 @@ public abstract class VersionedExternalizableMessage implements Externalizable,
     private short version = DataStoreVersions.CURRENT_VERSION;
 
     public VersionedExternalizableMessage() {
-
+        // Required for externalizable
     }
 
     public VersionedExternalizableMessage(final short version) {
         this.version = version <= DataStoreVersions.CURRENT_VERSION ? version : DataStoreVersions.CURRENT_VERSION;
     }
 
-    public short getVersion() {
+    public final short getVersion() {
         return version;
     }