Skip to content

Commit

Permalink
Checking the list if it is null or not
Browse files Browse the repository at this point in the history
  • Loading branch information
kalpesh30 authored and therajanmaurya committed Oct 16, 2018
1 parent 00bd79d commit e6ef485
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/src/main/java/org/mifos/mobilebanking/utils/DateHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ public static List<Integer> getCurrentDate(String dateFormat, String separator)
public static String getDateAsString(List<Integer> integersOfDate) {

StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(integersOfDate.get(2))
.append(' ')
.append(getMonthName(integersOfDate.get(1)))
.append(' ')
.append(integersOfDate.get(0));

if (integersOfDate != null) {
stringBuilder.append(integersOfDate.get(2))
.append(' ')
.append(getMonthName(integersOfDate.get(1)))
.append(' ')
.append(integersOfDate.get(0));
}
return stringBuilder.toString();
}

Expand Down

0 comments on commit e6ef485

Please sign in to comment.