*/
package org.opendaylight.protocol.pcep.impl;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandler.Sharable;
private final MessageRegistry registry;
public PCEPMessageToByteEncoder(final MessageRegistry registry) {
- this.registry = Preconditions.checkNotNull(registry);
+ this.registry = requireNonNull(registry);
}
@Override
protected void encode(final ChannelHandlerContext ctx, final Message msg, final ByteBuf out) {
- Preconditions.checkNotNull(msg);
+ requireNonNull(msg);
this.registry.serializeMessage(msg, out);
if (LOG.isTraceEnabled()) {
LOG.trace("Encoded : {}", ByteBufUtil.hexDump(out));