mali problem, vjerovatno negdje u mojoj :) logici;
Code:
public Account[] getAccountByType(String id_, String type_)
throws Exception {
Account[] foundAcc = null;
List<?> keys= ... (napunim ju i nije prazna)
foundAcc = new Account[keys.size()];
for (int i = 0; i < keys.size(); i++) {
int j=0;
if (uvijet){
foundAcc[j].setNekaObjektVrijednost("StringSetiran");
}
j++;
}
return foundAcc;
}
public Account[] getAccountByType(String id_, String type_)
throws Exception {
Account[] foundAcc = null;
List<?> keys= ... (napunim ju i nije prazna)
foundAcc = new Account[keys.size()];
for (int i = 0; i < keys.size(); i++) {
int j=0;
if (uvijet){
foundAcc[j].setNekaObjektVrijednost("StringSetiran");
}
j++;
}
return foundAcc;
}
Ugl. ovaj dio koda mi uvijek vraća null jer je kao:
foundAcc[j].setNekaObjektVrijednost("StringSetiran");
foundAcc[j] == null!
Ima netko ideju?
Hvala unaprijed,
Mile