From 3eb8355144950f713c61abd6950cf9acc2426193 Mon Sep 17 00:00:00 2001 From: David Kocher Date: Fri, 29 Jul 2016 12:05:41 +0200 Subject: [PATCH] Fix reading next part number from field nextPartNumber. (cherry picked from commit 5764b3b761cef35e3c2268df4d285929f53bd805) (cherry picked from commit 3966f8c) --- src/main/java/synapticloop/b2/response/B2ListPartsResponse.java | 2 +- .../java/synapticloop/b2/response/B2ResponseProperties.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/synapticloop/b2/response/B2ListPartsResponse.java b/src/main/java/synapticloop/b2/response/B2ListPartsResponse.java index 2de4080..49cbce4 100644 --- a/src/main/java/synapticloop/b2/response/B2ListPartsResponse.java +++ b/src/main/java/synapticloop/b2/response/B2ListPartsResponse.java @@ -33,7 +33,7 @@ public class B2ListPartsResponse extends BaseB2Response { public B2ListPartsResponse(String json) throws B2ApiException { super(json); - this.nextPartNumber = this.readInt(B2ResponseProperties.KEY_NEXT_FILE_ID); + this.nextPartNumber = this.readInt(B2ResponseProperties.KEY_NEXT_PART_NUMBER); JSONArray filesArray = this.readObjects(B2ResponseProperties.KEY_PARTS); diff --git a/src/main/java/synapticloop/b2/response/B2ResponseProperties.java b/src/main/java/synapticloop/b2/response/B2ResponseProperties.java index e05b4f5..2b6b99a 100644 --- a/src/main/java/synapticloop/b2/response/B2ResponseProperties.java +++ b/src/main/java/synapticloop/b2/response/B2ResponseProperties.java @@ -40,5 +40,6 @@ public final class B2ResponseProperties { public static final String KEY_BUCKETS = "buckets"; public static final String KEY_PARTS = "parts"; public static final String KEY_PART_NUMBER = "partNumber"; + public static final String KEY_NEXT_PART_NUMBER = "nextPartNumber"; public static final String KEY_MINIMUM_PART_SIZE = "minimumPartSize"; }