Skip to content

Commit

Permalink
avoiding inline if (bunq#93)
Browse files Browse the repository at this point in the history
at the cost of risk for index-out-of-bounds (prior code)
  • Loading branch information
tubbynl committed Jun 18, 2018
1 parent 85a696a commit cad108e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public User getFirstUser() {
BunqResponseRaw responseRaw = getRawResponse(USER_URL);
BunqResponse<List<User>> response = fromJsonList(User.class, responseRaw);

return !response.getValue().isEmpty()?response.getValue().get(FIRST):null;
return response.getValue().get(FIRST);
}

public MonetaryAccountBank getFirstActiveMonetaryAccountBankByUserId(Integer userId) {
Expand Down

0 comments on commit cad108e

Please sign in to comment.