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 / concepts / FailureEnvelopeProxy.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.access.concepts;
9
10 final class FailureEnvelopeProxy extends AbstractResponseEnvelopeProxy<RequestFailure<?, ?>> {
11     private static final long serialVersionUID = 1L;
12
13     // checkstyle flags the public modifier as redundant however it is explicitly needed for Java serialization to be
14     // able to create instances via reflection.
15     @SuppressWarnings("checkstyle:RedundantModifier")
16     public FailureEnvelopeProxy() {
17         // for Externalizable
18     }
19
20     FailureEnvelopeProxy(final FailureEnvelope envelope) {
21         super(envelope);
22     }
23
24     @Override
25     FailureEnvelope createEnvelope(final RequestFailure<?, ?> message, final long sessionId, final long txSequence) {
26         return new FailureEnvelope(message, sessionId, txSequence);
27     }
28 }