Skip to content

Conversation

@luigima
Copy link
Contributor

@luigima luigima commented May 22, 2018

gson.fromJson(rpcAnswer, MultiChainRPCAnswer.class);

It seems like gson is interpreting the result of getBlockCount as a double instead of long. This results in a failed instance type check. The blockcount stays zero which is incorrect.

I added a condition that casts the object to long whenever a double is returned. However, this will fail if gson returns an integer for example. I don't know if it would be better to catch all possible types or telling gson exactly what typ is expected.

@hubert-marteau hubert-marteau merged commit b48daa9 into hubert-marteau:master May 28, 2018
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.

2 participants