Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ironmq v3 initializes messages array with null on empty queues #80

Open
pax95 opened this issue Apr 12, 2015 · 0 comments
Open

Ironmq v3 initializes messages array with null on empty queues #80

pax95 opened this issue Apr 12, 2015 · 0 comments

Comments

@pax95
Copy link
Contributor

pax95 commented Apr 12, 2015

Just ran a test against a new v3 queue.
It seems that when the queue i empty the reserve method https://github.com/iron-io/iron_mq_java/blob/v3/src/main/java/io/iron/ironmq/Queue.java#L125
will cause Gson to read/initialise the Messages.messages array as null.
The https://github.com/iron-io/iron_mq_java/blob/v3/src/main/java/io/iron/ironmq/Messages.java is not prepared for this since there is no null checks on getters causing NPE.
Seems that there has been som IronMQ server changes that returns a empty json body causing Gson not being able to serialise the messages array properly.

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

No branches or pull requests

1 participant