iron-io/iron_mq_java

Ironmq v3 initializes messages array with null on empty queues

Opened this issue · 0 comments

pax95 commented

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.