knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
http://knowm.org/open-source/xchange/
MIT License
3.89k stars 1.95k forks source link

NPE @ KrakenPollingAccountService.getAccountInfo #272

Closed andre77 closed 10 years ago

andre77 commented 10 years ago

it comes to a NPE during the call KrakenPollingAccountService.getAccountInfo the creation of wallet with currency XNMC (Namecoins) leads to an error, since KrakenUtils.getCurrency(String krakenCurrencyCode) returns null for XNMC

java.lang.NullPointerException: Currency code must not be null at org.joda.money.MoneyUtils.checkNotNull(MoneyUtils.java:33) at org.joda.money.CurrencyUnit.of(CurrencyUnit.java:257) at com.xeiam.xchange.dto.trade.Wallet.createInstance(Wallet.java:61) at com.xeiam.xchange.kraken.KrakenAdapters.adaptBalance(KrakenAdapters.java:111) at com.xeiam.xchange.kraken.service.polling.KrakenPollingAccountService.getAccountInfo(KrakenPollingAccountService.java:64)

timmolter commented 10 years ago

Can you please try the latest V2.0.0 SNAPSHOT version? I believe that issue has been addressed already, just not yet released officially.

andre77 commented 10 years ago

you are right the bug is not present in the actual 2.0.0-SNAPSHOT thanks