fixes Coverity issue 72287

This commit is contained in:
Sebastian Stenzel
2016-03-04 01:31:26 +01:00
parent adc20ea2f2
commit e3256a747f

View File

@@ -71,7 +71,9 @@ class DavFileWithRange extends DavFile {
try {
final Long lower = requestRange.getLeft().isEmpty() ? null : Long.valueOf(requestRange.getLeft());
final Long upper = requestRange.getRight().isEmpty() ? null : Long.valueOf(requestRange.getRight());
if (lower == null) {
if (lower == null && upper == null) {
return new ImmutablePair<Long, Long>(0l, contentLength - 1);
} else if (lower == null) {
return new ImmutablePair<Long, Long>(contentLength - upper, contentLength - 1);
} else if (upper == null) {
return new ImmutablePair<Long, Long>(lower, contentLength - 1);