Skip to content

Add regression test for #5074 (NPE on futures orders without cummulativeQuoteQty)#5327

Open
Baqirrizvidev wants to merge 1 commit into
knowm:developfrom
Baqirrizvidev:test-5074-binance-futures-npe
Open

Add regression test for #5074 (NPE on futures orders without cummulativeQuoteQty)#5327
Baqirrizvidev wants to merge 1 commit into
knowm:developfrom
Baqirrizvidev:test-5074-binance-futures-npe

Conversation

@Baqirrizvidev

Copy link
Copy Markdown

Relates to #5074

USDT-M futures order responses carry no cummulativeQuoteQty field, which used to cause an NPE when adapting the order. The null guard added in #5075 (BinanceAdapters.javaorder.cumulativeQuoteQty != null before the divide) already fixes the reported crash, but the issue was left open and nothing prevents a regression.

This PR adds a fixture for a filled USDT-M futures MARKET order without cummulativeQuoteQty and a test asserting BinanceAdapters.adaptOrder(order, true) adapts it without throwing.

With this in, #5074 can be closed as fixed by #5075.

mvn -pl xchange-binance -am test -Dtest=BinanceAdaptersTest passes (4/4).

🤖 Generated with Claude Code

…eQty

USDT-M futures order responses have no cummulativeQuoteQty field,
which used to cause an NPE in BinanceAdapters.adaptOrder (knowm#5074).
The null guard added in knowm#5075 fixed it; this locks the behaviour in
with a test so it cannot regress.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant