More validation
This commit is contained in:
parent
c2169f2b73
commit
bba5b7bd42
@ -67,6 +67,11 @@ public class ChunkedFile implements ChunkedInput {
|
||||
throw new IllegalArgumentException(
|
||||
"length: " + length + " (expected: 0 or greater)");
|
||||
}
|
||||
if (chunkSize <= 0) {
|
||||
throw new IllegalArgumentException(
|
||||
"chunkSize: " + chunkSize +
|
||||
" (expected: a positive integer)");
|
||||
}
|
||||
|
||||
this.file = file;
|
||||
this.offset = startOffset = offset;
|
||||
|
Loading…
Reference in New Issue
Block a user