iron_mq_java icon indicating copy to clipboard operation
iron_mq_java copied to clipboard

Ironmq v3 initializes messages array with null on empty queues

Open pax95 opened this issue 9 years ago • 0 comments

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.

pax95 avatar Apr 12 '15 08:04 pax95