* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.core.connection;
-import com.google.common.base.Preconditions;
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.concurrent.Future;
// Passed to executor to request triggering of flush
protected final Runnable flushRunnable = this::flush;
+ @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR",
+ justification = "Circular dependency on outbound queue")
AbstractOutboundQueueManager(final ConnectionAdapterImpl parent, final InetSocketAddress address, final T handler) {
- this.parent = Preconditions.checkNotNull(parent);
- this.handler = Preconditions.checkNotNull(handler);
+ this.parent = requireNonNull(parent);
+ this.handler = requireNonNull(handler);
this.address = address;
/* Note: don't wish to use reflection here */
currentQueue = initializeStackedOutboudnqueue();
* selected by communication pipeline.
*/
protected Object makeMessageListenerWrapper(@NonNull final OfHeader msg) {
- Preconditions.checkArgument(msg != null);
-
+ checkArgument(msg != null);
if (address == null) {
return new MessageListenerWrapper(msg, LOG_ENCODER_LISTENER);
}