Don't complain about NULLs in network marker.
Dieser Commit ist enthalten in:
Ursprung
d8df5a7667
Commit
99eda4beca
@ -27,7 +27,7 @@ import com.google.common.primitives.Ints;
|
|||||||
public abstract class NetworkMarker {
|
public abstract class NetworkMarker {
|
||||||
public static class EmptyBufferMarker extends NetworkMarker {
|
public static class EmptyBufferMarker extends NetworkMarker {
|
||||||
public EmptyBufferMarker(@Nonnull ConnectionSide side) {
|
public EmptyBufferMarker(@Nonnull ConnectionSide side) {
|
||||||
super(side, (ByteBuffer)null, null);
|
super(side, (byte[]) null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -64,8 +64,8 @@ public abstract class NetworkMarker {
|
|||||||
*/
|
*/
|
||||||
public NetworkMarker(@Nonnull ConnectionSide side, ByteBuffer inputBuffer, PacketType type) {
|
public NetworkMarker(@Nonnull ConnectionSide side, ByteBuffer inputBuffer, PacketType type) {
|
||||||
this.side = Preconditions.checkNotNull(side, "side cannot be NULL.");
|
this.side = Preconditions.checkNotNull(side, "side cannot be NULL.");
|
||||||
this.inputBuffer = Preconditions.checkNotNull(inputBuffer, "inputBuffer cannot be NULL.");
|
this.inputBuffer = inputBuffer;
|
||||||
this.type = Preconditions.checkNotNull(type, "type cannot be NULL.");
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,7 +78,7 @@ public abstract class NetworkMarker {
|
|||||||
*/
|
*/
|
||||||
public NetworkMarker(@Nonnull ConnectionSide side, byte[] inputBuffer, PacketType type) {
|
public NetworkMarker(@Nonnull ConnectionSide side, byte[] inputBuffer, PacketType type) {
|
||||||
this.side = Preconditions.checkNotNull(side, "side cannot be NULL.");
|
this.side = Preconditions.checkNotNull(side, "side cannot be NULL.");
|
||||||
this.type = Preconditions.checkNotNull(type, "type cannot be NULL.");
|
this.type = type;
|
||||||
|
|
||||||
if (inputBuffer != null) {
|
if (inputBuffer != null) {
|
||||||
this.inputBuffer = ByteBuffer.wrap(inputBuffer);
|
this.inputBuffer = ByteBuffer.wrap(inputBuffer);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren