joaopsilva / binance-java-api

binance-java-api is a lightweight Java library for the Binance API, supporting synchronous and asynchronous requests, as well as event streaming using WebSockets.
212 stars 803 forks source link

fix NPE in example UserDataStreamExample #38

Open phil-e-b opened 3 years ago

phil-e-b commented 3 years ago

When running the UserDataStreamExample, after receiving an OrderTradeUpdateEvent, the final callback returns a null object at line 38, which then throws a NPE when trying to retrieve getOriginalQuantity().

Just added a null check for the event.