Fix CS warnings in cds-access-api and enable enforcement
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / LocalHistorySuccessProxyV1.java
index 7806c333546bfbddefc21c335cf5f47493b40a57..97a7a1c8d6c7e991d4cf629a0ffbc432968c723d 100644 (file)
@@ -20,7 +20,10 @@ import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifie
 final class LocalHistorySuccessProxyV1 extends AbstractSuccessProxy<LocalHistoryIdentifier, LocalHistorySuccess> {
     private static final long serialVersionUID = 1L;
 
-    LocalHistorySuccessProxyV1() {
+    // 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 LocalHistorySuccessProxyV1() {
         // For Externalizable
     }
 
@@ -29,12 +32,12 @@ final class LocalHistorySuccessProxyV1 extends AbstractSuccessProxy<LocalHistory
     }
 
     @Override
-    protected final LocalHistoryIdentifier readTarget(final DataInput in) throws IOException {
+    protected LocalHistoryIdentifier readTarget(final DataInput in) throws IOException {
         return LocalHistoryIdentifier.readFrom(in);
     }
 
     @Override
-    protected LocalHistorySuccess createSuccess(final LocalHistoryIdentifier target) {
-        return new LocalHistorySuccess(target);
+    protected LocalHistorySuccess createSuccess(final LocalHistoryIdentifier target, final long sequence) {
+        return new LocalHistorySuccess(target, sequence);
     }
 }