Skip to content

Commit

Permalink
fix: warn log can output directly, correct a format for log
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianhua Ran committed Mar 11, 2018
1 parent 503916b commit 3bb26a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ private ConnectTask(ConnectionProfile profile,

void updateConnectionProfile(long downloadedOffset) {
if (downloadedOffset == profile.currentOffset) {
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.w(this, "no data download, no need to update");
}
FileDownloadLog.w(this, "no data download, no need to update");
return;
}
final long newContentLength =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void run() throws IOException, IllegalAccessException, IllegalArgumentExc
if (contentLength != TOTAL_VALUE_IN_CHUNKED_RESOURCE && contentLength != fetchedLength) {
throw new FileDownloadGiveUpRetryException(
FileDownloadUtils.formatString("fetched length[%d] != content length[%d],"
+ " range[%d, %d) offset[%d] fetch begin offset",
+ " range[%d, %d) offset[%d] fetch begin offset[%d]",
fetchedLength, contentLength,
startOffset, endOffset, currentOffset, fetchBeginOffset));
}
Expand Down

0 comments on commit 3bb26a4

Please sign in to comment.