Skip to content

Commit c53a2d3

Browse files
committed
Skip checksum validation for multifile downloads where no checksum is provided
1 parent 6174d06 commit c53a2d3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/io/github/jpmorganchase/fusion/api/request/PartFetcher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
public class PartFetcher {
2929

3030
private static final String HEAD_PATH = "%s/operationType/download";
31-
private static final String HEAD_PATH_FOR_PART = "%s?downloadPartNumber=%d";
3231

3332
Client client;
3433
FusionTokenProvider credentials;
@@ -123,7 +122,9 @@ private String getSinglePartPath(PartRequest pr) {
123122
}
124123

125124
private String getMultiPartPath(PartRequest pr) {
126-
return String.format(HEAD_PATH_FOR_PART, getHeadPath(pr), pr.getPartNo());
125+
String headPath = getHeadPath(pr);
126+
String separator = headPath.contains("?") ? "&" : "?";
127+
return headPath + separator + "downloadPartNumber=" + pr.getPartNo();
127128
}
128129

129130
private String getHeadPath(PartRequest pr) {

0 commit comments

Comments
 (0)