Fix incorrect parameter validation in DefaultFileRegion

This commit is contained in:
Tony Rice 2013-06-19 12:19:57 -05:00 committed by Trustin Lee
parent dc6e2cd625
commit 6c5c119f8c

View File

@ -49,7 +49,7 @@ public class DefaultFileRegion extends AbstractReferenceCounted implements FileR
if (position < 0) {
throw new IllegalArgumentException("position must be >= 0 but was " + position);
}
if (count <= 0) {
if (count < 0) {
throw new IllegalArgumentException("count must be >= 0 but was " + count);
}
this.file = file;