Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
bugfix: fix NPE in FileMd5NotMatchHandler#getMd5FromMeta
Browse files Browse the repository at this point in the history
Signed-off-by: lowzj <[email protected]>
  • Loading branch information
lowzj committed Jun 19, 2019
1 parent f0b75ba commit cc2e79f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ boolean isInvalidInfo(ClientErrorInfo info) {
}

private void removeTask(String taskId) {
if (StringUtils.isNoneBlank(taskId)) {
if (StringUtils.isNotBlank(taskId)) {
remover.add(taskId, true);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ private String getMd5FromMeta(String taskId, String range) {
return null;
}
List<String> pieceMd5s = fileMetaDataService.readPieceMd5(taskId, meta.getRealMd5());
if (pieceMd5s == null) {
return null;
}

return pieceMd5s.size() > pieceNum ? pieceMd5s.get(pieceNum) : null;
}
Expand Down

0 comments on commit cc2e79f

Please sign in to comment.