From 99eda4becad014d5bae97b331e2d7391cfa63223 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Fri, 6 Dec 2013 18:10:22 +0100 Subject: [PATCH] Don't complain about NULLs in network marker. --- .../java/com/comphenix/protocol/events/NetworkMarker.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java b/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java index 85eac9ff..dcf721f0 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java @@ -27,7 +27,7 @@ import com.google.common.primitives.Ints; public abstract class NetworkMarker { public static class EmptyBufferMarker extends NetworkMarker { public EmptyBufferMarker(@Nonnull ConnectionSide side) { - super(side, (ByteBuffer)null, null); + super(side, (byte[]) null, null); } @Override @@ -64,8 +64,8 @@ public abstract class NetworkMarker { */ public NetworkMarker(@Nonnull ConnectionSide side, ByteBuffer inputBuffer, PacketType type) { this.side = Preconditions.checkNotNull(side, "side cannot be NULL."); - this.inputBuffer = Preconditions.checkNotNull(inputBuffer, "inputBuffer cannot be NULL."); - this.type = Preconditions.checkNotNull(type, "type cannot be NULL."); + this.inputBuffer = inputBuffer; + this.type = type; } /** @@ -78,7 +78,7 @@ public abstract class NetworkMarker { */ public NetworkMarker(@Nonnull ConnectionSide side, byte[] inputBuffer, PacketType type) { this.side = Preconditions.checkNotNull(side, "side cannot be NULL."); - this.type = Preconditions.checkNotNull(type, "type cannot be NULL."); + this.type = type; if (inputBuffer != null) { this.inputBuffer = ByteBuffer.wrap(inputBuffer);