Add serialVersionUID fields
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / ExistsTransactionSuccessProxyV1.java
index 538c1ffa7fbee1c4a9298ed8aa0e36002c151169..ed66fb2d3d21db7e96bf1f0a41663d21d904507a 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.cluster.access.commands;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
+import java.io.Serial;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 
 /**
@@ -19,16 +20,21 @@ import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier
  * @author Robert Varga
  */
 final class ExistsTransactionSuccessProxyV1 extends AbstractTransactionSuccessProxy<ExistsTransactionSuccess> {
+    @Serial
     private static final long serialVersionUID = 1L;
+
     private boolean exists;
 
+    // checkstyle flags the public modifier as redundant however it is explicitly needed for Java serialization to
+    // be able to create instances via reflection.
+    @SuppressWarnings("checkstyle:RedundantModifier")
     public ExistsTransactionSuccessProxyV1() {
         // For Externalizable
     }
 
     ExistsTransactionSuccessProxyV1(final ExistsTransactionSuccess request) {
         super(request);
-        this.exists = request.getExists();
+        exists = request.getExists();
     }
 
     @Override