- status: open --> closed
- assigned_to: nobody --> ccavanaugh
I got a NullPointerException, if the credit limit in the QIF
file wasn't set.
HotFix:
classQifImport
{
....
private Account generateAccount(QifAccount acc)
{
Account account;
CommodityNode defaultCurrency =
proxy.getRootAccount().getCommodityNode();
if (acc.type.equals("Bank"))
{
account = new BankAccount(defaultCurrency);
}
else if (acc.type.equals("CCard"))
{
account = new CreditAccount(defaultCurrency);
// @@@BUGFIX: what todp if there is no credit
limit in the qif file?
if( acc.creditLimit != null )
{
((CreditAccount) account).setCreditLimit(new
BigDecimal(acc.creditLimit));
}
}
else if (acc.type.equals("Cash"))
{
account = new CashAccount(defaultCurrency);
}
else if (acc.type.equals("Invst"))
{
account = new InvestmentAccount
(defaultCurrency);
}
else if (acc.type.equals("Oth A"))
{
account = new AssetAccount(defaultCurrency);
}
else if (acc.type.equals("Oth L"))
{
account = new LiabilityAccount(defaultCurrency);
}
else
{
return null;
}
account.setName(acc.name);
account.setDescription(acc.description);
return account;
}
...
}