activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elliotte Harold" <erhar...@gmail.com>
Subject MapMessage.getInt
Date Wed, 13 Jun 2007 14:48:24 GMT
Consider simple reception code like this:

        MapMessage message = (MapMessage) consumer.receive(1000);
        int x = message.getInt("foo"));

I notice that x is now set to zero even though there was no "foo" value in
the map. I would have expected an exception.

The JavaDoc is unclear on this point. Is this expected behavior? Can someone
explain to me why it behaves like this? What if zero is a legal value for
the map?

-- 
Elliotte Rusty Harold
erharold@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message