diff --git a/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/BaseClientErrorHandler.java b/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/BaseClientErrorHandler.java index 82c53acaf..6b5d9a0c3 100644 --- a/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/BaseClientErrorHandler.java +++ b/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/BaseClientErrorHandler.java @@ -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); } } diff --git a/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/FileMd5NotMatchHandler.java b/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/FileMd5NotMatchHandler.java index 511d770b1..6d3c01929 100644 --- a/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/FileMd5NotMatchHandler.java +++ b/src/supernode/src/main/java/com/dragonflyoss/dragonfly/supernode/service/repair/FileMd5NotMatchHandler.java @@ -129,6 +129,9 @@ private String getMd5FromMeta(String taskId, String range) { return null; } List pieceMd5s = fileMetaDataService.readPieceMd5(taskId, meta.getRealMd5()); + if (pieceMd5s == null) { + return null; + } return pieceMd5s.size() > pieceNum ? pieceMd5s.get(pieceNum) : null; }