Skip to content

Commit 6c74f90

Browse files
author
Deniz Yildirim
committed
Revert some back to Integers because they are unrelated to model item ids.
1 parent d8dc84f commit 6c74f90

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/com/bunq/sdk/http/ApiClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class ApiClient {
6565
/**
6666
* Response code to use in case the response code is null due to unforeseen circumstances.
6767
*/
68-
private static final long DUMMY_RESPONSE_CODE = 0;
68+
private static final int DUMMY_RESPONSE_CODE = 0;
6969

7070
/**
7171
* Private variables.
@@ -272,7 +272,7 @@ private String generateSignature(BunqRequestBuilder requestBuilder) {
272272
*/
273273
private BunqResponseRaw createBunqResponseRaw(Response response)
274274
throws IOException {
275-
long responseCode = response.code();
275+
int responseCode = response.code();
276276
byte[] responseBodyBytes = Objects.requireNonNull(response.body()).bytes();
277277

278278
assertResponseSuccess(responseCode, responseBodyBytes, getResponseId(response));
@@ -293,7 +293,7 @@ private static String getResponseId(Response response) {
293293
/**
294294
*
295295
*/
296-
private static void assertResponseSuccess(Long responseCode, byte[] responseBodyBytes, String responseId) {
296+
private static void assertResponseSuccess(Integer responseCode, byte[] responseBodyBytes, String responseId) {
297297
if (responseCode == null) {
298298
responseCode = DUMMY_RESPONSE_CODE;
299299
}
@@ -307,7 +307,7 @@ private static void assertResponseSuccess(Long responseCode, byte[] responseBody
307307
*
308308
*/
309309
private static ApiException createApiExceptionRequestUnsuccessful(
310-
Long responseCode,
310+
Integer responseCode,
311311
String responseBody,
312312
String responseId
313313
) {
@@ -359,7 +359,7 @@ private static List<String> fetchAllErrorDescription(JsonObject responseBodyJson
359359
*
360360
*/
361361
private void validateResponseSignature(
362-
long responseCode,
362+
int responseCode,
363363
byte[] responseBodyBytes,
364364
Response response
365365
) {

src/main/java/com/bunq/sdk/model/core/UserContextHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class UserContextHelper extends BunqModel {
3232
/**
3333
* The index of the first item in an array.
3434
*/
35-
private static final Long INDEX_FIRST = 0;
35+
private static final Integer INDEX_FIRST = 0;
3636

3737
/**
3838
* Status constants.

0 commit comments

Comments
 (0)