*/
package org.opendaylight.controller.cluster.access.concepts;
-import com.google.common.base.Verify;
+import static com.google.common.base.Verify.verifyNotNull;
+
import java.io.DataInput;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.concepts.WritableIdentifier;
import org.opendaylight.yangtools.concepts.WritableObjects;
// For Externalizable
}
- AbstractMessageProxy(final @Nonnull C message) {
+ AbstractMessageProxy(final @NonNull C message) {
this.target = message.getTarget();
this.sequence = message.getSequence();
}
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
- target = Verify.verifyNotNull(readTarget(in));
+ target = verifyNotNull(readTarget(in));
sequence = WritableObjects.readLong(in);
}
protected final Object readResolve() {
- return Verify.verifyNotNull(createMessage(target, sequence));
+ return verifyNotNull(createMessage(target, sequence));
}
- protected abstract @Nonnull T readTarget(@Nonnull DataInput in) throws IOException;
- abstract @Nonnull C createMessage(@Nonnull T target, long sequence);
-}
\ No newline at end of file
+ protected abstract @NonNull T readTarget(@NonNull DataInput in) throws IOException;
+
+ abstract @NonNull C createMessage(@NonNull T msgTarget, long msgSequence);
+}