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

Commit 1a97929

Browse files
committed
Fix possible null pointers when converting to primitive type.
(cherry picked from commit 410335e)
1 parent 4505ea0 commit 1a97929

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public class B2FileInfoResponse extends BaseB2Response {
3737

3838
private final Map<String, String> fileInfo;
3939
private final Action action;
40-
private final int size;
41-
private final long uploadTimestamp;
40+
private final Integer size;
41+
private final Long uploadTimestamp;
4242

4343
/**
4444
* Instantiate a file info response with the JSON response as a string from
@@ -101,7 +101,7 @@ public B2FileInfoResponse(final JSONObject response) throws B2ApiException {
101101
*
102102
* @return the length of content for this file
103103
*/
104-
public long getContentLength() { return this.contentLength; }
104+
public Long getContentLength() { return this.contentLength; }
105105

106106
/**
107107
* @return the MIME type of the file
@@ -135,14 +135,14 @@ public B2FileInfoResponse(final JSONObject response) throws B2ApiException {
135135
/**
136136
* @return The number of bytes in the file.
137137
*/
138-
public int getSize() { return this.size; }
138+
public Integer getSize() { return this.size; }
139139

140140
/**
141141
* Return the timestamp that the file was uploaded
142142
*
143143
* @return the timestamp for when the file was uploaded
144144
*/
145-
public long getUploadTimestamp() { return this.uploadTimestamp; }
145+
public Long getUploadTimestamp() { return this.uploadTimestamp; }
146146

147147
@Override
148148
protected Logger getLogger() { return LOGGER; }

0 commit comments

Comments
 (0)