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

Commit 21ba881

Browse files
authored
Merge pull request #29 from iterate-ch/bugfix/part-response-nextpartnumber
Fix reading next part number from field nextPartNumber.
2 parents 3c943b0 + 3eb8355 commit 21ba881

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/synapticloop/b2/response/B2ListPartsResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class B2ListPartsResponse extends BaseB2Response {
3333
public B2ListPartsResponse(String json) throws B2ApiException {
3434
super(json);
3535

36-
this.nextPartNumber = this.readInt(B2ResponseProperties.KEY_NEXT_FILE_ID);
36+
this.nextPartNumber = this.readInt(B2ResponseProperties.KEY_NEXT_PART_NUMBER);
3737

3838
JSONArray filesArray = this.readObjects(B2ResponseProperties.KEY_PARTS);
3939

src/main/java/synapticloop/b2/response/B2ResponseProperties.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ public final class B2ResponseProperties {
4040
public static final String KEY_BUCKETS = "buckets";
4141
public static final String KEY_PARTS = "parts";
4242
public static final String KEY_PART_NUMBER = "partNumber";
43+
public static final String KEY_NEXT_PART_NUMBER = "nextPartNumber";
4344
public static final String KEY_MINIMUM_PART_SIZE = "minimumPartSize";
4445
}

0 commit comments

Comments
 (0)