Skip to content

Commit 5cbd2e0

Browse files
committed
Use the root constructor
1 parent 7b7012f commit 5cbd2e0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

msgpack-core/src/main/java/org/msgpack/core/buffer/ArrayBufferInput.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import java.io.IOException;
1919

20-
import static org.msgpack.core.Preconditions.checkArgument;
2120
import static org.msgpack.core.Preconditions.checkNotNull;
2221

2322
/**
@@ -41,8 +40,7 @@ public ArrayBufferInput(byte[] arr)
4140

4241
public ArrayBufferInput(byte[] arr, int offset, int length)
4342
{
44-
checkArgument(offset + length <= arr.length);
45-
this.buffer = MessageBuffer.wrap(checkNotNull(arr, "input array is null")).slice(offset, length);
43+
this(MessageBuffer.wrap(checkNotNull(arr, "input array is null")).slice(offset, length));
4644
}
4745

4846
/**

0 commit comments

Comments
 (0)