2
For some reason the arrays are being sent null in setListGrades, but inside the log shows the normal arrays. The API is being consumed correctly, so it is null when sending this method?
@Override
public void onNext(GradeModel grades) {
BigDecimal[] gradesList = new BigDecimal[grades.getReportLists().length];
Integer[] faultsList = new Integer[grades.getReportLists().length];
String[] classesList = new String[grades.getReportLists().length];
for (int i = 0; i < grades.getReportLists().length; i++) {
gradesList[i] = grades.getReportLists()[i].getGradesList();
faultsList[i] = grades.getReportLists()[i].getFaultList();
classesList[i] = grades.getReportLists()[i].getClassList();
}
Log.i(TAG, "caralhoooooo " + Arrays.asList(classesList) + Arrays.asList(gradesList) + Arrays.asList(faultsList));
mainPresenter.setListGrades(gradesList, faultsList, classesList);
}
});
Put complete code and detailed error.
– Márcio Oliveira
Hello, obg for interest. The complete code I can not because there are more than 30 classes and hundreds or thousands of lines. The model is a common model with gets and setters. There are no problems in other parts of the code. The only problem is that in this line
mainPresenter.setListGrades(gradesList, faultsList, classesList);
null values are being sent, and the log demonstrates that they are not null. What could be?– Danilo Silva