Skip to content

Commit 2c53948

Browse files
committed
Tidy more optional properties
1 parent 1f5796e commit 2c53948

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

labkey-client-api/src/org/labkey/remoteapi/query/ImportDataResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public class ImportDataResponse extends CommandResponse
3232
public ImportDataResponse(String text, int statusCode, String contentType, JSONObject json, Command sourceCommand)
3333
{
3434
super(text, statusCode, contentType, json, sourceCommand);
35-
_success = json.has("success") ? json.getBoolean("success") : Boolean.FALSE;
36-
_rowCount = json.has("rowCount") ? json.getNumber("rowCount").intValue() : 0;
37-
_jobId = json.has("jobId") ? json.getString("jobId") : null;
35+
_success = json.optBoolean("success");
36+
_rowCount = json.optInt("rowCount");
37+
_jobId = json.optString("jobId");
3838
}
3939

4040
public Boolean getSuccess()

0 commit comments

Comments
 (0)